]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR c++/67581 (ICE on transparent union with -g enabled on x86_64-linux-gnu (verify...
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
b58d3df2
ML
12015-11-27 Martin Liska <mliska@suse.cz>
2
3 PR c++/68312
4 * c-array-notation.c (fix_builtin_array_notation_fn):
5 Use release_vec_vec instead of vec::release.
6 (build_array_notation_expr): Likewise.
7 (fix_conditional_array_notations_1): Likewise.
8 (fix_array_notation_expr): Likewise.
9 (fix_array_notation_call_expr): Likewise.
10
aec17bfe
JJ
112015-11-27 Jakub Jelinek <jakub@redhat.com>
12
13 PR c/63326
14 * c-parser.c (c_parser_compound_statement_nostart): If
15 last_label is true, use pragma_stmt instead of pragma_compound
16 as second c_parser_pragma argument.
17 (c_parser_omp_ordered, c_parser_omp_target_update,
18 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
19 false as second argument to c_parser_skip_to_pragma_eol after
20 diagnosing standalone directives used in pragma_stmt context.
21
688c4de0
IV
222015-11-24 Ilya Verbin <ilya.verbin@intel.com>
23
24 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
25 with "if (ENABLE_OFFLOADING)".
26
cbd03aee
DM
272015-11-23 David Malcolm <dmalcolm@redhat.com>
28
29 PR objc/68438
30 * c-parser.c (c_parser_postfix_expression): Set up source ranges
31 for various Objective-C constructs: Class.name syntax,
32 @selector(), @protocol(), @encode(), and [] message syntax.
33
a87a86e1
DM
342015-11-20 David Malcolm <dmalcolm@redhat.com>
35
36 PR 62314
37 * c-typeck.c (should_suggest_deref_p): New function.
38 (build_component_ref): Special-case POINTER_TYPE when
39 generating a "not a structure of union" error message, and
40 suggest a "->" rather than a ".", providing a fix-it hint.
41
8ece8dfb
DM
422015-11-19 David Malcolm <dmalcolm@redhat.com>
43
44 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
45 candidate into a new function, find_closest_identifier.
46
433068cc
MP
472015-11-19 Marek Polacek <polacek@redhat.com>
48
49 PR c/68412
50 * c-typeck.c (parser_build_binary_op): Properly handle
51 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
52
bef08b71
DM
532015-11-17 David Malcolm <dmalcolm@redhat.com>
54
55 * c-parser.c (set_c_expr_source_range): Bulletproof both
56 overloaded implementations against NULL expr->value.
57 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
58 values.
59 (c_parser_unary_expression): Likewise when handling addresses of
60 labels.
61 (c_parser_postfix_expression): Likewise for statement expressions,
62 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
63 __builtin_va_arg, and for __builtin_offset_of.
64 (c_parser_postfix_expression_after_paren_type): Initialize expr's
65 src_range using the range of the braced initializer.
66 (c_parser_transaction_expression): Set src_range for "ret" to a
67 sane pair of values.
68
fff77217
KY
692015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
70
71 * c-parser.c (c_finish_omp_declare_simd): Look for
72 "simd" attribute as well. Update error message.
73
1d899da2
TS
742015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
75
76 * c-parser.c (c_parser_omp_declare_target): Adjust.
77
e4606348
JJ
782015-11-14 Jakub Jelinek <jakub@redhat.com>
79
80 * c-typeck.c (c_finish_omp_clauses): Don't mark
81 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
82
3e636daf
MP
832015-11-14 Marek Polacek <polacek@redhat.com>
84
85 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
86 * c-typeck.c: Likewise.
87
ebedc9a3
DM
882015-11-13 David Malcolm <dmalcolm@redhat.com>
89
90 * c-decl.c (warn_defaults_to): Pass line_table to
91 rich_location ctor.
92 * c-errors.c (pedwarn_c99): Likewise.
93 (pedwarn_c90): Likewise.
94 * c-parser.c (set_c_expr_source_range): New functions.
95 (c_token::get_range): New method.
96 (c_token::get_finish): New method.
97 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
98 based on the range from the start of the LHS to the end of the
99 RHS.
100 (c_parser_conditional_expression): Likewise, based on the range
101 from the start of the cond.value to the end of exp2.value.
102 (c_parser_binary_expression): Call set_c_expr_source_range on
103 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
104 (c_parser_cast_expression): Call set_c_expr_source_range on ret
105 based on the cast_loc through to the end of the expr.
106 (c_parser_unary_expression): Likewise, based on the
107 op_loc through to the end of op.
108 (c_parser_sizeof_expression) Likewise, based on the start of the
109 sizeof token through to either the closing paren or the end of
110 expr.
111 (c_parser_postfix_expression): Likewise, using the token range,
112 or from the open paren through to the close paren for
113 parenthesized expressions.
114 (c_parser_postfix_expression_after_primary): Likewise, for
115 various kinds of expression.
116 * c-tree.h (struct c_expr): Add field "src_range".
117 (c_expr::get_start): New method.
118 (c_expr::get_finish): New method.
119 (set_c_expr_source_range): New decls.
120 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
121 on ret for prefix unary ops.
122 (parser_build_binary_op): Likewise, running from the start of
123 arg1.value through to the end of arg2.value.
124
ec8b536f
MP
1252015-11-13 Marek Polacek <polacek@redhat.com>
126
127 PR c/68320
128 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
129
277fe616
DM
1302015-11-13 David Malcolm <dmalcolm@redhat.com>
131
132 * c-typeck.c: Include spellcheck.h.
133 (lookup_field_fuzzy_find_candidates): New function.
134 (lookup_field_fuzzy): New function.
135 (build_component_ref): If the field was not found, try using
136 lookup_field_fuzzy and potentially offer a suggestion.
137
6e232ba4
JN
1382015-11-12 James Norris <jnorris@codesourcery.com>
139 Joseph Myers <joseph@codesourcery.com>
140
141 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
142 (c_parser_omp_clause_name): Handle 'device_resident' clause.
143 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
144 and PRAGMA_OMP_CLAUSE_LINK.
145 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
146 and PRAGMA_OACC_CLAUSE_LINK.
147 (OACC_DECLARE_CLAUSE_MASK): New definition.
148 (c_parser_oacc_declare): New function.
149
9be4f715
MP
1502015-11-12 Marek Polacek <polacek@redhat.com>
151
152 PR c/67784
153 * c-parser.c (c_parser_for_statement): Reclassify the token in
154 a correct scope.
155
e78bede6
MP
1562015-11-11 Marek Polacek <polacek@redhat.com>
157
158 PR c/68107
159 PR c++/68266
160 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
161 checking the size of an array.
162
69f293c9
AM
1632015-11-11 Andrew MacLeod <amacleod@redhat.com>
164
165 * c-array-notation.c: Remove unused header files.
166 * c-aux-info.c: Likewise.
167 * c-convert.c: Likewise.
168 * c-decl.c: Likewise.
169 * c-errors.c: Likewise.
170 * c-lang.c: Likewise.
171 * c-objc-common.c: Likewise.
172 * c-parser.c: Likewise.
173 * c-typeck.c: Likewise.
174 * gccspec.c: Likewise.
175
3a40d81d
NS
1762015-11-09 Thomas Schwinge <thomas@codesourcery.com>
177 Cesar Philippidis <cesar@codesourcery.com>
178 James Norris <jnorris@codesourcery.com>
179 Julian Brown <julian@codesourcery.com>
180 Nathan Sidwell <nathan@codesourcery.com>
181
182 c/
183 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
184 routine arg.
185 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
186 (c_parser_pragma): Parse 'acc routine'.
187 (OACC_ROUTINE_CLAUSE_MARK): Define.
188 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
189
fc402eec
AA
1902015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
191
192 PR debug/67192
193 * c-typeck.c (c_finish_loop): For unconditional loops, set the
194 location of the backward-goto to the start of the loop body.
195
f6b0b3db
AA
1962015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
197
198 PR debug/67192
199 * c-parser.c (c_parser_while_statement): Finish the loop before
200 parsing ahead for misleading indentation.
201 (c_parser_for_statement): Likewise.
202
ee45a32d
EB
2032015-11-08 Eric Botcazou <ebotcazou@adacore.com>
204
205 * c-decl.c (finish_struct): If the structure has reverse storage
206 order, rewrite the type of array fields with scalar component. Call
207 maybe_apply_pragma_scalar_storage_order on entry.
208 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
209 errors on bit-fields and reverse SSO here and not...
210 (c_mark_addressable): ...here.
211 (output_init_element): Adjust call to initializer_constant_valid_p.
212 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
213
8a645150
DM
2142015-11-06 David Malcolm <dmalcolm@redhat.com>
215
216 * c-decl.c (warn_defaults_to): Update for change in signature
217 of diagnostic_set_info.
218 * c-errors.c (pedwarn_c99): Likewise.
219 (pedwarn_c90): Likewise.
220 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
221 for textinfo::set_location.
222
7a5e4956
CP
2232015-11-05 Cesar Philippidis <cesar@codesourcery.com>
224 Thomas Schwinge <thomas@codesourcery.com>
225 James Norris <jnorris@codesourcery.com>
226
227 * c-parser.c (c_parser_omp_clause_name): Add support for
228 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
229 (c_parser_omp_clause_default): Add is_oacc argument. Handle
230 default(none) in OpenACC.
231 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
232 arguments.
233 (c_parser_oacc_clause_tile): New function.
234 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
235 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
236 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
237 TILE}.
238 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
239 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
240 FIRSTPRIVATE}.
241 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
242 (c_parser_oacc_update): Update the error message for missing clauses.
243 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
244 and OMP_CLAUSE_INDEPENDENT.
245
bfcfbfa0
MP
2462015-11-05 Marek Polacek <polacek@redhat.com>
247
248 PR c/68090
249 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
250 deal with pre-evaluation on invalid types.
251
e01d41e5
JJ
2522015-11-05 Jakub Jelinek <jakub@redhat.com>
253 Ilya Verbin <ilya.verbin@intel.com>
254
255 * c-parser.c: Include context.h and gimple-expr.h.
256 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
257 monotonic together with nonmonotonic.
258 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
259 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
260 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
261 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
262 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
263 expressions on combined target teams before the target.
264 (c_parser_omp_declare_target): If decl has "omp declare target" or
265 "omp declare target link" attribute, and cgraph or varpool node already
266 exists, then set corresponding flags. Call c_finish_omp_clauses
267 in the parenthesized extended-list syntax case.
268 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
269 declare target.
270 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
271 on OMP_CLAUSE_REDUCTION array sections.
272 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
273 into the constant offset, or for variable low-bound using
274 POINTER_PLUS_EXPR. For structure element based array sections use
275 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
276 (c_finish_omp_clauses): Drop generic_field_head, structure
277 elements are now always mapped even as array section bases,
278 diagnose same var in data sharing and mapping clauses. Diagnose if
279 linear step on declare simd is neither a constant nor a uniform
280 parameter. Look through POINTER_PLUS_EXPR for array section
281 reductions. Diagnose the same var or function appearing multiple
282 times on the same directive. Fix up wording for the to clause if t
283 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
284 modifier on kinds other than dynamic or guided or nonmonotonic
285 modifier together with ordered clause.
286
4bf9e5a8
TS
2872015-11-03 Thomas Schwinge <thomas@codesourcery.com>
288 Chung-Lin Tang <cltang@codesourcery.com>
289
290 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
291
2adfab87
AM
2922015-10-29 Andrew MacLeod <amacleod@redhat.com>
293
294 * c-array-notation.c: Reorder #include's and remove duplicates.
295 * c-aux-info.c: Likewise.
296 * c-convert.c: Likewise.
297 * c-decl.c: Likewise.
298 * c-errors.c: Likewise.
299 * c-lang.c: Likewise.
300 * c-objc-common.c: Likewise.
301 * c-parser.c: Likewise.
302 * c-typeck.c: Likewise.
303
e922069e
JW
3042015-10-26 Jim Wilson <jim.wilson@linaro.org>
305
306 PR debug/66068
307 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
308 after calling build_qualified_type.
309
765dd391
CP
3102015-10-27 Cesar Philippidis <cesar@codesourcery.com>
311 Thomas Schwinge <thomas@codesourcery.com>
312 James Norris <jnorris@codesourcery.com>
313 Joseph Myers <joseph@codesourcery.com>
314 Julian Brown <julian@codesourcery.com>
315 Bernd Schmidt <bschmidt@redhat.com>
316
317 * c-parser.c (c_parser_oacc_shape_clause): New.
318 (c_parser_oacc_simple_clause): New.
319 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
320 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
321
88bae6f4
TS
3222015-10-27 Thomas Schwinge <thomas@codesourcery.com>
323 James Norris <jnorris@codesourcery.com>
324 Cesar Philippidis <cesar@codesourcery.com>
325
326 PR c/64765
327 PR c/64880
328 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
329 parameters, and handle these. Adjust all users.
330 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
331 into...
332 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
333 all users.
334 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
335 declare functions.
336 (c_finish_omp_construct): Declare function.
337 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
338 Merge functions into...
339 (c_finish_omp_construct): ... this new function.
340
a8fc2579
RB
3412015-10-22 Richard Biener <rguenther@suse.de>
342
343 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
344 before folding a MINUS_EXPR.
345
e9122ef6
MP
3462015-10-21 Marek Polacek <polacek@redhat.com>
347
348 PR c/68024
349 * c-decl.c (start_function): Warn about vararg functions without
350 a prototype.
351
9f47c7e5
IE
3522015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
353
354 * c-typeck.c (build_conditional_expr): Use boolean vector
355 type for vector comparison.
356 (build_vec_cmp): New.
357 (build_binary_op): Use build_vec_cmp for comparison.
358
fa60eeb9
MP
3592015-10-20 Marek Polacek <polacek@redhat.com>
360
361 * c-parser.c (is_cilkplus_vector_p): Don't define here.
362
2c7020eb
MP
3632015-10-20 Marek Polacek <polacek@redhat.com>
364
365 PR c/67964
366 * c-parser.c (c_parser_attributes): Break out of the loop if the
367 token after an attribute isn't a comma.
368
d9a6bd32
JJ
3692015-10-13 Jakub Jelinek <jakub@redhat.com>
370 Aldy Hernandez <aldyh@redhat.com>
371
372 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
373 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
374 (c_parser_omp_variable_list): Handle structure elements for
375 map, to and from clauses. Handle array sections in reduction
376 clause. Formatting fixes.
377 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
378 if clause modifiers.
379 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
380 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
381 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
382 c_parser_omp_clause_is_device_ptr): New functions.
383 (c_parser_omp_clause_ordered): Parse optional parameter.
384 (c_parser_omp_clause_reduction): Handle array reductions.
385 (c_parser_omp_clause_schedule): Parse optional simd modifier.
386 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
387 functions.
388 (c_parser_omp_clause_linear): Parse linear clause modifiers.
389 (c_parser_omp_clause_depend_sink): New function.
390 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
391 (c_parser_omp_clause_map): Parse release/delete map kinds and
392 optional always modifier.
393 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
394 and c_finish_omp_clauses callers.
395 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
396 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
397 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
398 (OMP_CRITICAL_CLAUSE_MASK): Define.
399 (c_parser_omp_critical): Parse critical clauses.
400 (c_parser_omp_for_loop): Handle doacross loops, adjust
401 c_finish_omp_for and c_finish_omp_clauses callers.
402 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
403 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
404 (OMP_FOR_CLAUSE_MASK): Add linear clause.
405 (c_parser_omp_for): Disallow ordered clause when combined with
406 distribute. Disallow linear clause when combined with distribute
407 and not combined with simd.
408 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
409 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
410 parse clauses and if depend clause is found, don't parse a body.
411 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
412 Allow target parallel without for after it.
413 (OMP_TASK_CLAUSE_MASK): Add priority clause.
414 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
415 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
416 invalid kinds.
417 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
418 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
419 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
420 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
421 functions.
422 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
423 defaultmap and is_device_ptr clauses.
424 (c_parser_omp_target): Parse target parallel and target simd. Set
425 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
426 and target exit data. Diagnose invalid map kinds.
427 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
428 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
429 construct.
430 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
431 &omp_priv.
432 (OMP_TASKLOOP_CLAUSE_MASK): Define.
433 (c_parser_omp_taskloop): New function.
434 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
435 handle PRAGMA_OMP_TASKLOOP.
436 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
437 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
438 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
439 Add IS_OMP argument, handle structure element bases, diagnose
440 bitfields, pass IS_OMP recursively, diagnose known zero length
441 array sections in depend clauses, handle array sections in reduction
442 clause, diagnose negative length even for pointers.
443 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
444 types, pass IS_OMP down to handle_omp_array_sections_1, handle
445 array sections in reduction clause, set
446 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
447 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
448 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
449 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
450
21ba0cea
MP
4512015-10-06 Marek Polacek <polacek@redhat.com>
452
453 * c-parser.c (c_parser_statement_after_labels): Use
454 protected_set_expr_location.
455 (c_parser_omp_clause_num_gangs): Likewise.
456 (c_parser_omp_clause_num_threads): Likewise.
457 (c_parser_omp_clause_num_workers): Likewise.
458 (c_parser_omp_clause_vector_length): Likewise.
459 (c_parser_omp_clause_num_teams): Likewise.
460 (c_parser_omp_clause_thread_limit): Likewise.
461 * c-typeck.c (build_c_cast): Likewise.
462 (c_cast_expr): Likewise.
463
624d31fe
RS
4642015-10-05 Richard Sandiford <richard.sandiford@arm.com>
465
466 * c-typeck.c (c_tree_equal): Use real_equal instead of
467 REAL_VALUES_EQUAL.
468
b8fd7909
JM
4692015-10-04 Jason Merrill <jason@redhat.com>
470
471 * c-parser.c (c_lex_one_token): Handle @synchronized.
472 * c-decl.c (match_builtin_function_types): A declaration of a built-in
473 can change whether the function is transaction_safe.
474
1c7485af
MP
4752015-10-02 Marek Polacek <polacek@redhat.com>
476
477 PR c/67730
478 * c-typeck.c (convert_for_assignment): Use the expansion point
479 location throughout.
480
3e3b8d63
MP
4812015-10-02 Marek Polacek <polacek@redhat.com>
482
483 PR c/64249
484 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
485 and pass it down to c_parser_if_statement.
486 (c_parser_else_body): Add CHAIN parameter and pass it down to
487 c_parser_statement_after_labels.
488 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
489 duplicated if-else-if conditions.
490
aabef2de
MP
4912015-10-01 Marek Polacek <polacek@redhat.com>
492
493 * c-typeck.c (convert_for_assignment): Improve commentary.
494
de8ddd5f
MP
4952015-09-30 Marek Polacek <polacek@redhat.com>
496
497 PR c/67730
498 * c-typeck.c (c_finish_return): Use the expansion point location for
499 certain "return with value" warnings.
500
c4914de6
MLI
5012015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
502
503 * c-parser.c (pragma_lex): Add loc argument.
504
0e36f5c7
MP
5052015-09-15 Marek Polacek <polacek@redhat.com>
506
507 PR c/67580
508 * c-decl.c (tag_exists_p): New function.
509 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
510 struct/union/enum keywords are missing.
511 * c-tree.h (tag_exists_p): Declare.
512
2f3bb934
MP
5132015-09-15 Marek Polacek <polacek@redhat.com>
514
515 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
516 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
517 Return NULL_TREE instead of 0.
518 (lookup_name): Return NULL_TREE instead of 0.
519 (lookup_name_in_scope): Likewise.
520 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
521 (parser_xref_tag): Use false instead of 0.
522 (start_struct): Use true instead of 1.
523 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
524
aa256c4a
MP
5252015-09-14 Marek Polacek <polacek@redhat.com>
526
527 * c-typeck.c (set_nonincremental_init_from_string): Use
528 HOST_WIDE_INT_M1U when shifting a negative value.
529
dbb68221
MW
5302015-09-09 Mark Wielaard <mjw@redhat.com>
531
532 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
533 parm against NULL.
534
a8a098ac
JJ
5352015-09-10 Jakub Jelinek <jakub@redhat.com>
536
537 PR c/67502
538 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
539 into OMP_FOR_PRE_BODY rather than before the loop.
540
f4b189d5
JJ
5412015-09-09 Jakub Jelinek <jakub@redhat.com>
542
0bb99c11
JJ
543 PR c/67501
544 * c-parser.c (c_parser_oacc_all_clauses,
545 c_parser_omp_all_clauses): Remove invalid clause from
546 list of clauses even if parser->error is set.
547
fce5e5e3
JJ
548 PR c/67500
549 * c-parser.c (c_parser_omp_clause_aligned,
550 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
551 test for errors.
552 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
553 error_mark_node.
554
f4b189d5
JJ
555 PR c/67495
556 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
557 instead of c_parser_unary_expression. If the result is !lvalue_p,
558 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
559
b2aaf235
MP
5602015-09-04 Marek Polacek <polacek@redhat.com>
561
562 PR sanitizer/67279
563 * c-typeck.c (build_binary_op): Don't instrument static initializers.
564
1807ffc1
MS
5652015-09-03 Martin Sebor <msebor@redhat.com>
566
567 PR c/66516
8b652e65
JJ
568 * c-typeck.c (convert_arguments, parser_build_unary_op,
569 build_conditional_expr, c_cast_expr, convert_for_assignment,
570 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
571 reject_gcc_builtin.
572 (c_decl_implicit): Define.
573
d04ff417
MP
5742015-09-02 Marek Polacek <polacek@redhat.com>
575
576 PR c/67432
577 * c-parser.c (c_parser_enum_specifier): Give a better error for
578 an empty enum.
579
a79683d5
TS
5802015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
581
582 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
583
191a6b94
MP
5842015-08-12 Marek Polacek <polacek@redhat.com>
585
586 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
587 LOC to it.
588
420a9d9b
MP
5892015-08-03 Marek Polacek <polacek@redhat.com>
590
591 PR c/67088
592 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
593 Use it.
594 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
595
992118a1
PP
5962015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
597
598 * c-parser.c (c_parser_if_body): Take token_indent_info
599 argument. Call warn_for_misleading_indentation even when the
600 body is a semicolon. Extract token_indent_infos corresponding
601 to the guard, body and next tokens. Adjust call to
602 warn_for_misleading_indentation accordingly.
603 (c_parser_else_body): Likewise.
604 (c_parser_if_statement): Likewise.
605 (c_parser_while_statement): Likewise.
606 (c_parser_for_statement): Likewise.
607
46308474
LFSM
6082015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
609 Manuel López-Ibáñez <manu@gcc.gnu.org>
610
611 * c-decl.c (get_parm_info): Remove static var. Update warning
612 message.
613
05b28fd6
MP
6142015-07-27 Marek Polacek <polacek@redhat.com>
615
616 PR c++/66555
617 PR c/54979
618 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
619
451b5e48
MP
6202015-07-20 Marek Polacek <polacek@redhat.com>
621
622 PR c++/55095
623 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
624 (build_binary_op): Warn about left shift overflows.
625
1916bcb5
AM
6262015-07-09 Andrew MacLeod <amacleod@redhat.com>
627
628 * c-array-notation.c: Adjust includes for flags.h changes.
629 * c-objc-common.c: Likewise.
630
c7131fb2
AM
6312015-07-07 Andrew MacLeod <amacleod@redhat.com>
632
633 * c-array-notation.c: Adjust includes.
634 * c-aux-info.c: Likewise.
635 * c-convert.c: Likewise.
636 * c-decl.c: Likewise.
637 * c-errors.c: Likewise.
638 * c-lang.c: Likewise.
639 * c-objc-common.c: Likewise.
640 * c-parser.c: Likewise.
641 * c-typeck.c: Likewise.
642
da2e71c9
MLI
6432015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
644
645 PR fortran/66605
646 * c-decl.c (finish_function): Call do_warn_unused_parameter.
647
b155cfd9
MP
6482015-06-29 Marek Polacek <polacek@redhat.com>
649
650 PR c/66322
651 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
652 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
653 about -Wswitch-bool here.
654 (do_case): Update c_add_case_label call.
655 (c_finish_case): Update c_do_switch_warnings call.
656
31521951
MP
6572015-06-27 Marek Polacek <polacek@redhat.com>
658
659 * c-typeck.c: Use VECTOR_TYPE_P throughout.
660
22d03525
MP
6612015-06-26 Marek Polacek <polacek@redhat.com>
662
663 * c-array-notation.c (fix_builtin_array_notation_fn): Use
664 INDIRECT_REF_P.
665 * c-typeck.c (array_to_pointer_conversion): Likewise.
666 (build_unary_op): Likewise.
667 (c_finish_return): Likewise.
668
f0889939
AM
6692015-06-25 Andrew MacLeod <amacleod@redhat.com>
670
671 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
672 * c-parser.c: Likewise.
673
8d67ee55
RS
6742015-06-25 Richard Sandiford <richard.sandiford@arm.com>
675
676 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
677 instead of pointer_hash.
678 (detect_field_duplicates): Likewise.
679
0ae9bd27
MP
6802015-06-25 Marek Polacek <polacek@redhat.com>
681
682 * c-array-notation.c: Use VAR_P throughout.
683 * c-decl.c: Likewise.
684 * c-objc-common.c: Likewise.
685 * c-parser.c: Likewise.
686 * c-typeck.c: Likewise.
687
62f9079a
MP
6882015-06-25 Marek Polacek <polacek@redhat.com>
689
690 * c-decl.c: Use is_global_var throughout.
691 * c-parser.c: Likewise.
692 * c-typeck.c: Likewise.
693
abb226c9
AM
6942015-06-17 Andrew MacLeod <amacleod@redhat.com>
695
696 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
697 * c-aux-info.c: Likewise.
698 * c-convert.c: Likewise.
699 * c-decl.c: Likewise.
700 * c-errors.c: Likewise.
701 * c-lang.c: Likewise.
702 * c-objc-common.c: Likewise.
703 * c-parser.c: Likewise.
704 * c-typeck.c: Likewise.
705
8cbababc
JH
7062015-06-11 Jan Hubicka <hubicka@ucw.cz>
707
708 PR middle-end/66325
709 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
710 variants.
711
a0349665
PMR
7122015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
713
714 * c-decl.c (pop_scope): Register the main translation unit
715 through the new debug hook.
716
13fdf2e2
AM
7172015-06-08 Andrew MacLeod <amacleod@redhat.com>
718
719 * c-array-notation.c : Adjust include files.
720 * c-aux-info.c : Likewise.
721 * c-convert.c : Likewise.
722 * c-decl.c : Likewise.
723 * c-errors.c : Likewise.
724 * c-lang.c : Likewise.
725 * c-lang.h : Likewise.
726 * c-objc-common.c : Likewise.
727 * c-parser.c : Likewise.
728 * c-typeck.c : Likewise.
729
d7438551
AH
7302015-06-05 Aldy Hernandez <aldyh@redhat.com>
731
732 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
733 immediately clobber it.
734 (c_write_global_declarations_1): Remove call to
735 check_global_declaration_1.
736 (c_write_global_declarations_2): Remove.
737 (c_write_final_cleanups): Rename from c_write_global_declarations.
738 Remove call to finalize_compilation_unit.
739 Remove calls to debugging hooks.
740 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
741 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
742 * c-tree.h: Remove c_write_global_declarations.
743
ecb9f223
AM
7442015-06-04 Andrew MacLeod <amacleod@redhat.com>
745
746 * c-array-notation.c: Adjust includes for restructured coretypes.h.
747 * c-aux-info.c: Likewise.
748 * c-convert.c: Likewise.
749 * c-decl.c: Likewise.
750 * c-errors.c: Likewise.
751 * c-lang.c: Likewise.
752 * c-objc-common.c: Likewise.
753 * c-parser.c: Likewise.
754 * c-typeck.c: Likewise.
755
9482b620
MP
7562015-06-04 Marek Polacek <polacek@redhat.com>
757
758 PR c/66341
759 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
760 it is a lvalue.
761
bc51ace3
PK
7622015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
763
764 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
765 Warn for empty struct.
766 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
767
ea5b45b6
AT
7682015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
769
770 * c-decl.c (start_function): Call plugin before parsing.
771 (finish_function): Call plugin after parsing.
772
c2d47482
PK
7732015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
774
775 PR c/49551
776 * c-decl.c (merge_decls): Merge DECL_COMMON.
777
a95492ab
JW
7782015-05-22 Jim Wilson <jim.wilson@linaro.org>
779
780 * Make-lang.in (check_gcc_pallelize): Define.
781
fd5c817a
MP
7822015-05-22 Marek Polacek <polacek@redhat.com>
783
784 PR c/47043
785 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
786 attributes.
787
c7b70a3c
MP
7882015-05-21 Marek Polacek <polacek@redhat.com>
789
790 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
791 DECL_BUILT_IN.
792
21b634ae
MP
7932015-05-20 Marek Polacek <polacek@redhat.com>
794
795 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
796 * c-typeck.c: Likewise.
797
296a8c2f
MP
7982015-05-19 Marek Polacek <polacek@redhat.com>
799
800 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
801
41b37d5e
JJ
8022015-05-19 Jakub Jelinek <jakub@redhat.com>
803
804 PR middle-end/66199
805 * c-parser.c (c_parser_omp_for_loop): Don't add
806 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
807 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
808 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
809 constructs.
810
fab27f52
MM
8112015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
812
813 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 814 swaps.
fab27f52 815
40de31cf
MLI
8162015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
817
818 PR fortran/44054
819 * c-objc-common.c (c_tree_printer): Replace locus pointer with
820 accessor function.
821
3aa3c9fc
MP
8222015-05-14 Marek Polacek <polacek@redhat.com>
823
824 PR c/66066
825 PR c/66127
826 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
827 rather than with 0.
828
c3388e62
DM
8292015-05-12 David Malcolm <dmalcolm@redhat.com>
830
831 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
832 to add a call to warn_for_misleading_indentation.
833 (c_parser_else_body): Likewise, adding param "else_loc".
834 (c_parser_if_statement): Check for misleading indentation.
835 (c_parser_while_statement): Likewise.
836 (c_parser_for_statement): Likewise.
837
755e528f
MP
8382015-05-08 Marek Polacek <polacek@redhat.com>
839
840 PR c/64918
841 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
842 (output_init_element): Likewise.
843
0173bd2a
MP
8442015-05-07 Marek Polacek <polacek@redhat.com>
845
846 PR c/65179
847 * c-typeck.c (build_binary_op): Warn when left shifting a negative
848 value.
849
9babc352
MP
8502015-04-30 Marek Polacek <polacek@redhat.com>
851
852 * c-typeck.c (set_init_label): Call error_at instead of error and
853 pass LOC to it.
854
ac9f18db
MP
855 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
856 the type of a decl.
857
ec3fba51
MP
858 * c-typeck.c (c_build_va_arg): Clarify the error message.
859
b811915d
TS
8602015-04-29 Thomas Schwinge <thomas@codesourcery.com>
861
862 * c-parser.c (c_parser_oacc_enter_exit_data): Use
863 OMP_STANDALONE_CLAUSES.
864
f3075008
MP
8652015-04-28 Marek Polacek <polacek@redhat.com>
866
867 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
868
4e81b788
MP
8692015-04-28 Marek Polacek <polacek@redhat.com>
870
871 PR c/65901
872 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
873
6c1db78e
MP
8742015-04-25 Marek Polacek <polacek@redhat.com>
875
876 PR c/52085
877 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
878 attribute.
879
5c4abbb8
MP
8802015-04-23 Marek Polacek <polacek@redhat.com>
881
882 PR c/65345
883 * c-decl.c (set_labels_context_r): New function.
884 (store_parm_decls): Call it via walk_tree_without_duplicates.
885 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
886 instead of create_tmp_var. Build TARGET_EXPR instead of
887 COMPOUND_EXPR.
888 (build_atomic_assign): Use create_tmp_var_raw instead of
889 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
890
06aca1d5
IV
8912015-04-20 Ilya Verbin <ilya.verbin@intel.com>
892
893 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
894 (c_parser_omp_target_update): Add missed %> to error_at ().
895
8fba1830
BRF
8962015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
897
898 PR target/55143
899 * c-decl.c (c_default_pointer_mode): Remove definition.
900 * c-tree.h (c_default_pointer_mode): Remove declaration.
901
62021f64
TB
9022015-03-27 Tobias Burnus <burnus@net-b.de>
903
904 PR c/65586
905 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
906 error out.
907 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
908 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
909 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
910
9b65e171
JJ
9112015-03-19 Jakub Jelinek <jakub@redhat.com>
912
913 * c-decl.c (c_decl_attributes): Also add "omp declare target"
914 attribute for DECL_EXTERNAL VAR_DECLs.
915
17958621
JJ
9162015-03-11 Jakub Jelinek <jakub@redhat.com>
917
918 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
919 argument.
920
7ccb1a11
JJ
9212015-03-10 Jakub Jelinek <jakub@redhat.com>
922
923 PR c/65120
924 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
925 before preparing arguments to warn_logical_not_parentheses.
926
01177669
JJ
9272015-03-09 Jakub Jelinek <jakub@redhat.com>
928
929 PR c/65120
930 * c-typeck.c (parser_build_binary_op): Don't warn for
931 !!x == y or !b == y where b is _Bool.
932
802ac282
MP
9332015-03-09 Marek Polacek <polacek@redhat.com>
934
935 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
936 * c-decl.c (grokdeclarator): Likewise.
937 * c-typeck.c (build_binary_op): Likewise.
938
e5165b60
MP
9392015-02-27 Marek Polacek <polacek@redhat.com>
940
941 PR c/65228
942 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
943
065d214c
MP
9442015-02-14 Marek Polacek <polacek@redhat.com>
945
946 PR c/64768
947 * c-decl.c (grokdeclarator): Set the range of a flexible array member
948 declared through a typedef name.
949
e5d9235b
MP
9502015-02-13 Marek Polacek <polacek@redhat.com>
951
952 PR c/65050
953 * c-decl.c (grokdeclarator): Print also the type when giving
954 the error message about array's incomplete element type.
955
fa01ffcc
JJ
9562015-02-11 Jakub Jelinek <jakub@redhat.com>
957
958 PR c/64824
959 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
960 check in the POP macro.
961
c3e38a03
MP
9622015-02-09 Marek Polacek <polacek@redhat.com>
963
964 PR c/64856
965 * c-typeck.c (process_init_element): Don't always wrap
966 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
967 initializing a range of elements.
968
4886ec8e
JJ
9692015-02-04 Jakub Jelinek <jakub@redhat.com>
970
971 PR c/64824
972 PR c/64868
973 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
974
c3e38a03 9752015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
976
977 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
978 processing enum declaration.
979
7b33f0c8
MP
9802015-01-29 Marek Polacek <polacek@redhat.com>
981
982 PR c/64709
983 * c-typeck.c (pop_init_level): If constructor_elements has
984 exactly one element with integer_zerop value, set constructor_zeroinit
985 to 1. Remove braces around warning_init call.
986
dea63e49
JJ
9872015-01-27 Jakub Jelinek <jakub@redhat.com>
988
989 PR c/64766
990 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
991 of FUNCTION_DECLs with error_mark_node.
992
d38f7dce
JJ
9932015-01-26 Jakub Jelinek <jakub@redhat.com>
994
995 PR c/64778
996 * c-typeck.c (convert_arguments): Return -1 if there are
997 error_args, even if we've diagnosed too many arguments.
998
cbf5d0e7
RB
9992015-01-21 Richard Biener <rguenther@suse.de>
1000
1001 PR middle-end/64313
1002 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1003 for builtins the user declared correctly.
1004
41dbbb37
TS
10052015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1006 Bernd Schmidt <bernds@codesourcery.com>
1007 Cesar Philippidis <cesar@codesourcery.com>
1008 James Norris <jnorris@codesourcery.com>
1009 Jakub Jelinek <jakub@redhat.com>
1010 Ilmir Usmanov <i.usmanov@samsung.com>
1011
1012 * c-parser.c: Include "gomp-constants.h".
1013 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1014 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1015 Use OMP_CLAUSE_SET_MAP_KIND.
1016 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1017 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1018 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1019 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1020 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1021 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1022 "copyout", "create", "delete", "deviceptr", "gang", "host",
1023 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1024 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1025 "present_or_create", "pcreate", "seq", "self", "vector",
1026 "vector_length", "wait", "worker".
1027 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1028 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1029 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1030 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1031 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1032 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1033 (c_parser_oacc_data_clause_deviceptr)
1034 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1035 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1036 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1037 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1038 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1039 (c_parser_oacc_parallel, c_parser_oacc_update)
1040 (c_parser_oacc_wait): New functions.
1041 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1042 (c_finish_oacc_data): New prototypes.
1043 * c-typeck.c: Include "gomp-constants.h".
1044 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1045 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1046 OMP_CLAUSE_SET_MAP_KIND.
1047 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1048 (c_finish_oacc_data): New functions.
1049 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1050 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1051 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1052 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1053 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1054 GOMP_MAP_FORCE_DEVICEPTR.
1055
adfac8df
JJ
10562015-01-09 Michael Collison <michael.collison@linaro.org>
1057
1058 * c-array-notation.c: Include hash-set.h, machmode.h,
1059 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1060 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1061 * c-aux-info.c: Ditto.
1062 * c-convert.c: Ditto.
1063 * c-decl.c: Ditto.
1064 * c-errors.c: Ditto.
1065 * c-lang.c: Dittoxs.
1066 * c-objc-common.c: Ditto.
1067 * c-parser.c: Ditto.
1068 * c-typeck.c: Include hash-set.h, machmode.h,
1069 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1070 fold-const.h, wide-int.h, inchash.h, real.h and
1071 fixed-value.h due to flattening of tree.h.
1072
2cc901dc
MP
10732015-01-07 Marek Polacek <polacek@redhat.com>
1074
1075 PR c/64417
1076 * c-typeck.c (process_init_element): Disallow initialization of
1077 a flexible array member with a string constant if the structure
1078 is in an array.
1079
5624e564
JJ
10802015-01-05 Jakub Jelinek <jakub@redhat.com>
1081
e5341100
JJ
1082 PR sanitizer/64344
1083 * c-typeck.c (convert_for_assignment, c_finish_return): For
1084 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1085 types also set in_late_binary_op around convert call.
1086 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1087 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1088 result on expr as last argument to ubsan_instrument_float_cast,
1089 if in_late_binary_op, don't use c_save_expr but save_expr.
1090
5624e564
JJ
1091 Update copyright years.
1092
5bd012f8
MP
10932015-01-05 Marek Polacek <polacek@redhat.com>
1094
1095 PR c/64423
1096 * c-typeck.c (build_array_ref): Pass loc down to
1097 warn_array_subscript_with_type_char.
1098
768952be
MU
10992014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1100
1101 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1102 (common-pointer-type): For pointers to arrays take qualifiers from
1103 element type.
1104 (build_conditional_expr): Add warnings for lost qualifiers.
1105 (comp-target-types): Allow pointers to arrays with different qualifiers.
1106 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1107 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1108 to PEDWARN_FOR_QUALIFIERS.
1109
8f94a8c4
JJ
11102014-12-17 Jakub Jelinek <jakub@redhat.com>
1111
1112 PR sanitizer/64289
1113 * c-convert.c: Include ubsan.h.
1114 (convert): For real -> integral casts and
1115 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1116 instead instrument the float cast directly.
1117
b731b390
JJ
11182014-11-29 Jakub Jelinek <jakub@redhat.com>
1119
1120 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1121 c_finish_stmt_expr): Remove NULL last argument from
1122 create_tmp_var_raw and create_tmp_var calls.
1123 * c-array-notation.c (fix_builtin_array_notation_fn,
1124 build_array_notation_expr, fix_conditional_array_notations_1,
1125 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1126
541e35a6
MP
11272014-11-28 Marek Polacek <polacek@redhat.com>
1128
1129 PR c/63862
1130 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1131 convert the right operand to integer type.
1132
b286be94
MP
11332014-11-25 Marek Polacek <polacek@redhat.com>
1134
1135 PR c/63877
1136 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1137 for inline functions.
1138
aa7da51a
JJ
11392014-11-21 Jakub Jelinek <jakub@redhat.com>
1140
1141 PR target/63764
1142 * c-typeck.c (build_array_ref): Adjust
1143 convert_vector_to_pointer_for_subscript caller. If it returns true,
1144 call non_lvalue_loc on the result.
1145
d876207f
RB
11462014-11-11 Richard Biener <rguenther@suse.de>
1147
1148 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1149 to true.
1150
e5e44252
AK
11512014-11-10 Andi Kleen <ak@linux.intel.com>
1152
1153 PR c/60804
1154 * c-parser.c (c_parser_statement_after_labels): Call
1155 check_no_cilk.
1156 (c_parser_if_statement): Dito.
1157 (c_parser_switch_statement): Dito.
1158 (c_parser_while_statement): Dito.
1159 (c_parser_do_statement): Dito.
1160 (c_parser_for_statement): Dito.
1161 * c-typeck.c (c_finish_loop): Dito.
1162
13c21655
PC
11632014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1164
1165 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1166 OPT_Wshift_count_overflow in the warnings.
1167
2d51fcef
MP
11682014-10-30 Marek Polacek <polacek@redhat.com>
1169
1170 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1171 print the stripped version as well, if they're not the same.
1172
ef4bddc2
RS
11732014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1174
1175 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1176 machine_mode.
1177
c582198b
AM
11782014-10-28 Andrew MacLeod <amacleod@redhat.com>
1179
1180 * c-decl.c: Adjust include files.
1181 * c-parser.c: Ditto.
1182
ddc8de03
PM
11832014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1184 Tom Tromey <tromey@redhat.com>
1185
1186 * c-tree.h (enum c_oracle_request): New.
1187 (c_binding_oracle_function): New typedef.
1188 (c_binding_oracle, c_pushtag, c_bind): Declare.
1189 * c-decl.c (c_binding_oracle): New global.
1190 (I_SYMBOL_CHECKED): New macro.
1191 (i_symbol_binding): New function.
1192 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1193 (I_TAG_CHECKED): New macro.
1194 (i_tag_binding): New function.
1195 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1196 (I_LABEL_CHECKED): New macro.
1197 (i_label_binding): New function.
1198 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1199 (c_print_identifier): Save and restore c_binding_oracle.
1200 (c_pushtag, c_bind): New functions.
1201
60393bbc
AM
12022014-10-27 Andrew MacLeod <amacleod@redhat.com>
1203
1204 * c-typeck.c: Adjust include files.
1205
d723bb7c
MLI
12062014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1207
1208 PR c++/53061
1209 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1210 initialization here...
1211 (c_initialize_diagnostics): ... but here. Set defaults after
1212 building pretty-printer.
1213
1bc5a451
MP
12142014-10-23 Marek Polacek <polacek@redhat.com>
1215
1216 PR c/63626
1217 * c-decl.c (pop_scope): Don't print warning in external_scope.
1218
4435bb92
MP
12192014-10-19 Marek Polacek <polacek@redhat.com>
1220
1221 PR c/63567
1222 * c-typeck.c (output_init_element): Allow initializing objects with
1223 static storage duration with compound literals even in C99 and add
1224 pedwarn for it.
1225
7278465e
MP
12262014-10-17 Marek Polacek <polacek@redhat.com>
1227
1228 PR c/63567
1229 * c-typeck.c (digest_init): Allow initializing objects with static
1230 storage duration with compound literals even in C99 and add pedwarn
1231 for it.
1232
d9b7be2e
MP
12332014-10-17 Marek Polacek <polacek@redhat.com>
1234
1235 PR c/63543
1236 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1237 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1238 error multiple times. Print the type.
1239
f406ae1f
MP
12402014-10-17 Marek Polacek <polacek@redhat.com>
1241
1242 PR c/63549
1243 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1244 type.
1245
92574c7c
MP
12462014-10-17 Marek Polacek <polacek@redhat.com>
1247
1248 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1249 (start_function): Use OPT_Wimplicit_int instead of 0.
1250 (store_parm_decls_oldstyle): Likewise.
1251
1bc4a978
MT
12522014-10-17 Alan Modra <amodra@gmail.com>
1253
1254 PR middle-end/61848
1255 * c-decl.c (merge_decls): Don't merge section name or tls model
1256 to newdecl symtab node, instead merge to olddecl. Override
1257 existing olddecl section name. Set tls_model for all thread-local
1258 vars, not just OMP thread-private ones. Remove incorrect comment.
1259
83685514
AM
12602014-10-16 Andrew MacLeod <amacleod@redhat.com>
1261
1262 * c-decl.c: Adjust include files.
1263
78a7c317
DD
12642014-10-14 DJ Delorie <dj@redhat.com>
1265
1266 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1267 (c_token_starts_typename): Check all __intN, not just __int128.
1268 (c_token_starts_declspecs): Likewise.
1269 (c_parser_declspecs): Likewise.
1270 (c_parser_attribute_any_word): Likewise.
1271 (c_parser_objc_selector): Likewise.
1272 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1273 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1274 is specified.
1275 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1276 __int128.
1277 (finish_declspecs): Likewise.
1278
74d98c1e
AB
12792014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1280
1281 * c-parser.c (c_parser_all_labels): New function to replace
1282 the duplicate code.
1283 (c_parser_statement): Call the new function.
1284
84937de2
MP
12852014-10-09 Marek Polacek <polacek@redhat.com>
1286
1287 PR c/63480
1288 * c-typeck.c (pop_init_level): Don't warn about initializing
1289 with { }.
1290
0382aaa0
MP
12912014-10-07 Marek Polacek <polacek@redhat.com>
1292
1293 PR c/59717
1294 * c-decl.c (header_for_builtin_fn): New function.
1295 (implicitly_declare): Suggest which header to include.
1296
7a0ca710
MP
12972014-10-07 Marek Polacek <polacek@redhat.com>
1298
1299 * c-convert.c (convert): Use error_operand_p.
1300 * c-typeck.c (require_complete_type): Likewise.
1301 (really_atomic_lvalue): Likewise.
1302 (digest_init): Likewise.
1303 (handle_omp_array_sections_1): Likewise.
1304
6bc8a126
MP
13052014-10-03 Marek Polacek <polacek@redhat.com>
1306
1307 PR c/63453
1308 * c-decl.c (pop_scope): Don't warn about "inline function declared
1309 but never defined" for functions marked with gnu_inline attribute.
1310
d90c0a59
JJ
13112014-09-25 Jakub Jelinek <jakub@redhat.com>
1312
1313 PR c++/63249
1314 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1315 on low_bound and length.
1316
083e891e
MP
13172014-09-24 Marek Polacek <polacek@redhat.com>
1318
1319 PR c/61405
1320 PR c/53874
1321 * c-parser.c: Don't define CPP_KEYWORD.
1322 (c_parser_switch_statement): Pass original type to c_finish_case.
1323 * c-tree.h (c_finish_case): Update declaration.
1324 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1325 conditionally to c_do_switch_warnings.
1326
8d95fe25
MP
13272014-09-03 Marek Polacek <polacek@redhat.com>
1328
1329 PR c/62024
1330 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1331 conversions.
1332
9a771876
JJ
13332014-09-02 Jakub Jelinek <jakub@redhat.com>
1334 Balaji V. Iyer <balaji.v.iyer@intel.com>
1335 Igor Zamyatin <igor.zamyatin@intel.com>
1336
1337 * c-parser.c (c_parser_cilk_for): New function.
1338 (c_parser_cilk_grainsize): Likewise.
1339 (c_get_temp_regvar): Likewise.
1340 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1341 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1342 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1343 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1344 case.
1345
b7679d96
CG
13462014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1347
1348 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1349 with using HOST_WIDE_INT without truncation to 'int'
1350
59ea0364
MP
13512014-08-22 Marek Polacek <polacek@redhat.com>
1352
1353 PR c++/62199
1354 * c-typeck.c (parser_build_binary_op): Adjust call to
1355 warn_logical_not_parentheses.
1356
671a475e
IZ
13572014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1358
1359 PR other/62008
1360 * c-parser.c (c_parser_array_notation): Check for correct
1361 type of an array added.
1362
04159acf
MP
13632014-08-19 Marek Polacek <polacek@redhat.com>
1364
1365 PR c++/62153
1366 * c-typeck.c (build_binary_op): If either operand of a comparison
1367 is a boolean expression, call maybe_warn_bool_compare.
1368
c77935ee
PP
13692014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1370
1371 PR c/45584
1372 * c-typeck.c (build_c_cast): Do a conversion even when the
1373 TYPE_MAIN_VARIANTs are the same.
1374
35aff4fb
MP
13752014-08-19 Marek Polacek <polacek@redhat.com>
1376
1377 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1378 pedwarn_c99 instead of pedwarn.
1379 (grokfield): Likewise.
1380 (warn_defaults_to): New function.
1381 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1382 Unconditionally call pedwarn_c99 instead of pedwarn.
1383 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1384 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1385 check flag_isoc11 before.
1386 * c-errors.c (pedwarn_c99): Change the return type to bool.
1387 Handle -Wc99-c11-compat.
1388 * c-parser.c (disable_extension_diagnostics): Handle
1389 warn_c99_c11_compat.
1390 (restore_extension_diagnostics): Likewise.
1391 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1392 instead of pedwarn, don't check flag_isoc11 before.
1393 (c_parser_declspecs): Likewise.
1394 (c_parser_alignas_specifier): Likewise.
1395 (c_parser_alignof_expression): Likewise.
1396 (c_parser_generic_selection): Likewise.
1397 * c-tree.h (pedwarn_c99): Update declaration.
1398 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1399 of pedwarn_c99.
1400
177cce46
MP
14012014-08-19 Marek Polacek <polacek@redhat.com>
1402
1403 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1404 to pedwarn_c90.
1405 * c-errors.c: Include "opts.h".
1406 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1407 * c-parser.c (disable_extension_diagnostics): Handle negative value
1408 of warn_c90_c99_compat, too.
1409 (restore_extension_diagnostics): Likewise.
1410 (c_parser_compound_statement_nostart): Pass
1411 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1412
6dc99c33
MP
14132014-08-12 Marek Polacek <polacek@redhat.com>
1414
1415 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1416 Add pedwarn.
1417 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1418 Likewise.
1419 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1420
f3bede71
MP
14212014-08-10 Marek Polacek <polacek@redhat.com>
1422
1423 PR c/51849
1424 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1425 Call pedwarn_c90 instead of pedwarn.
1426 (check_bitfield_type_and_width): Likewise.
1427 (declspecs_add_qual): Likewise.
1428 (declspecs_add_type): Likewise.
1429 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1430 Adjust to only call pedwarn_c90.
1431 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1432 pedwarn_c90 instead of pedwarn.
1433 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1434 * c-parser.c (disable_extension_diagnostics): Handle
1435 warn_c90_c99_compat.
1436 (restore_extension_diagnostics): Likewise.
1437 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1438 pedwarn_c90 instead of pedwarn.
1439 (c_parser_initelt): Likewise.
1440 (c_parser_postfix_expression): Likewise.
1441 (c_parser_postfix_expression_after_paren_type): Likewise.
1442 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1443 * c-tree.h: Fix formatting.
1444 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
1445 pedwarn_c90 instead of pedwarn.
1446
9f25a338
TS
14472014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1448
1449 * c-typeck.c: Remove include of pointer-set.h.
1450
044331a8
MP
14512014-08-07 Marek Polacek <polacek@redhat.com>
1452
1453 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1454
b787e7a2
TS
14552014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1456
1457 * c-typeck.c: Use hash_map instead of pointer_map.
1458
6e2830c3
TS
14592014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1460
1461 * c-decl.c: Use hash_set instead of pointer_set.
1462
a7ee52fb
IZ
14632014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1464
1465 PR middle-end/61455
1466 * c-array-notation.c (expand_array_notations): Handling
1467 of DECL_EXPR added.
1468
b4dfdc11
MG
14692014-07-31 Marc Glisse <marc.glisse@inria.fr>
1470
1471 PR c++/60517
1472 * c-typeck.c (c_finish_return): Return 0 instead of the address of
1473 a local variable.
1474
976d5a22
TT
14752014-07-30 Tom Tromey <tromey@redhat.com>
1476
1477 * c-typeck.c (struct constructor_stack) <designator_depth>: New
1478 field.
1479 (really_start_incremental_init, push_init_level): Initialize
1480 designator_depth.
1481 (pop_init_level): Set global designator_depth.
1482 (process_init_element): Check for designated_init attribute.
1483
30281de2
MP
14842014-07-20 Marek Polacek <polacek@redhat.com>
1485
1486 PR c/61852
1487 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
1488 (implicitly_declare): Pass location to implicit_decl_warning.
1489
b108f48f
JJ
14902014-07-14 Jakub Jelinek <jakub@redhat.com>
1491
1492 PR middle-end/61294
1493 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1494 If non-NULL, call c_parser_check_literal_zero.
1495 (c_parser_check_literal_zero): New function.
1496 (c_parser_postfix_expression_after_primary): Adjust
1497 c_parser_expr_list caller, handle -Wmemset-transposed-args.
1498
773ec47f
MP
14992014-07-06 Marek Polacek <polacek@redhat.com>
1500
1501 PR c/6940
1502 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1503 * c-tree.h (C_ARRAY_PARAMETER): Define.
1504 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1505 function parameter.
1506
22e1cf1c
JH
15072014-07-02 Jan Hubicka <hubicka@ucw.cz>
1508 Chen Gang <gang.chen.5i5j@gmail.com>
1509
1510 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1511 releasing symbol.
1512
52ec0ea3
MP
15132014-07-01 Marek Polacek <polacek@redhat.com>
1514
1515 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1516 instead of 0 to WARN_FOR_ASSIGNMENT.
1517
d5c3d343
MP
15182014-07-01 Marek Polacek <polacek@redhat.com>
1519
1520 PR c/58286
1521 * c-typeck.c (convert_for_assignment): Pass
1522 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1523
6a7253a4
MP
15242014-06-30 Marek Polacek <polacek@redhat.com>
1525
1526 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1527 has no_sanitize_undefined attribute.
1528
5e88a8f4
IZ
15292014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1530
1531 PR middle-end/57541
1532 * c-array-notation.c (fix_builtin_array_notation_fn):
1533 Check for 0 arguments in builtin call. Check that bultin argument is
1534 correct.
1535 * c-parser.c (c_parser_array_notation): Check for incorrect initial
1536 index.
1537
9698b078
SH
15382014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
1539
1540 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
1541 qualifiers in __auto_type for atomic types.
1542 (c_parser_typeof_specifier): Discard all type qualifiers in
1543 __typeof__ for atomic types.
1544
6e07c515
MP
15452014-06-25 Marek Polacek <polacek@redhat.com>
1546
1547 PR c/61162
1548 * c-parser.c (c_parser_statement_after_labels): Pass the location of
1549 the return expression to c_finish_return.
1550
da6f124d
JJ
15512014-06-25 Jakub Jelinek <jakub@redhat.com>
1552
1553 * c-typeck.c (c_finish_omp_clauses): Make sure
1554 OMP_CLAUSE_LINEAR_STEP has correct type.
1555
c203e8a7
TS
15562014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1557
1558 * c-decl.c: Adjust.
1559
56ad0e38
JJ
15602014-06-24 Jakub Jelinek <jakub@redhat.com>
1561
1562 * c-parser.c (c_parser_omp_for_loop): For
1563 #pragma omp parallel for simd move lastprivate clause from parallel
1564 to for rather than simd.
1565
47c2554f
MP
15662014-06-23 Marek Polacek <polacek@redhat.com>
1567
1568 * c-typeck.c (parser_build_binary_op): Don't call
1569 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1570
56363ffd
JH
15712014-06-15 Jan Hubicka <hubicka@ucw.cz>
1572
1573 * c-parser.c (c_parser_omp_threadprivate): Likewise.
1574 * c-decl.c (merge_decls): Likewise.
1575
d7ff7ae5
MP
15762014-06-09 Marek Polacek <polacek@redhat.com>
1577
1578 PR c/36446
1579 * c-typeck.c (error_init): Call inform instead of error_at.
1580 (pedwarn_init): Call inform instead of pedwarn.
1581 (warning_init): Call inform instead of warning_at.
1582
24d047a3
JH
15832014-06-07 Jan Hubicka <hubicka@ucw.cz>
1584
1585 * c-decl.c (merge_decls): Use set_decl_section_name.
1586 (duplicate_decls): Remove node if it exists.
1587
9bac5cbb
G
15882014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1589
1590 PR c/53119
1591 * c-typeck.c (push_init_level, process_init_element,
1592 pop_init_level): Correct check for zero initialization, move
1593 missing brace warning to respect zero initialization.
1594
8ffcdea8
MP
15952014-06-05 Marek Polacek <polacek@redhat.com>
1596
1597 PR c/56724
1598 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1599
742938c9
MP
16002014-06-05 Marek Polacek <polacek@redhat.com>
1601
1602 PR c/49706
1603 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1604 on the left hand side operand of a comparison.
1605
6447c55d
MP
16062014-06-05 Marek Polacek <polacek@redhat.com>
1607
1608 PR c/48062
1609 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1610 Print note only if the warning was printed.
1611
9dc7743c
IZ
16122014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1613
1614 PR c/58942
1615 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1616 with a pointer.
1617
fedfecef
MP
16182014-06-03 Marek Polacek <polacek@redhat.com>
1619
1620 PR c/60439
1621 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1622 c_start_case.
1623 * c-tree.h (c_start_case): Update.
1624 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1625 switch condition has boolean value.
1626
9b2b7279
AM
16272014-06-02 Andrew MacLeod <amacleod@redhat.com>
1628
1629 * c-decl.c: Include builtins.h.
1630 * c-parser.c: Likewise.
1631
5c1bc275
MP
16322014-05-27 Marek Polacek <polacek@redhat.com>
1633
1634 PR c/56724
1635 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1636 error and warning calls to error_at and warning_at. Pass location of
1637 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1638 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1639 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1640
97563bc8
IZ
16412014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1642
1643 PR c/61191
1644 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1645 function parameters.
1646
aede2c10
JH
16472014-05-23 Jan Hubicka <hubicka@ucw.cz>
1648
1649 * c-decl.c (merge_decls): Preserve symtab node pointers.
1650 (duplicate_decls): Free new decl.
1651
edbba2ce
TS
16522014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1653
f3316c6d
TS
1654 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1655 initialization.
1656
edbba2ce
TS
1657 * c-parser.c (c_parser_omp_target): Return bool values.
1658
68c81f24
TS
16592014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1660
1661 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1662 num_teams_loc variable to num_thread_limit_loc.
1663
632f2871
RS
16642014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1665
1666 * c-array-notation.c (expand_array_notations): Use void_node
1667 instead of void_zero_node.
1668
766090c2
TS
16692014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1670
1671 * c-decl.c (finish_struct): Adjust.
1672 (finish_enum): Likewise.
1673 (bind): Adjust.
1674 (record_inline_static): Likewise.
1675 (push_scope): Likewise.
1676 (make_label): Likewise.
1677 (lookup_label_for_goto): Likewise.
1678 (finish_struct): Likewise.
1679 (finish_enum): Likewise.
1680 (store_parm_decls): Likewise.
1681 (c_push_function_context): Likewise.
1682 * c-lang.h: Remove usage of variable_size gty attribute.
1683 * c-parser.c (c_parse_init): Adjust.
1684 (c_parse_file): Likewise.
1685
2b107f6b
MP
16862014-05-13 Marek Polacek <polacek@redhat.com>
1687
1688 PR c/61162
1689 * c-typeck.c (convert_for_assignment): Pass location to
1690 WARN_FOR_ASSIGNMENT instead of input_location.
1691
d033409e
MP
16922014-05-10 Marek Polacek <polacek@redhat.com>
1693
1694 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1695 maybe_warn_string_init.
1696 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1697 maybe_warn_string_init.
1698 * c-tree.h (maybe_warn_string_init): Update declaration.
1699 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1700 Call pedwarn_init with loc instead of with input_location.
1701 (digest_init): Pass init_loc to maybe_warn_string_init.
1702 (pop_init_level): Call pedwarn_init with loc instead of with
1703 input_location.
1704 (set_init_index): Likewise.
1705 (process_init_element): Likewise.
1706
ea58ef42
MP
17072014-05-09 Marek Polacek <polacek@redhat.com>
1708
1709 PR c/61096
1710 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1711 (c_parser_initelt): Pass location to set_init_label. Pass array index
1712 location to set_init_index.
1713 * c-tree.h (push_init_level): Update declaration.
1714 (pop_init_level): Likewise.
1715 (set_init_index): Likewise.
1716 (set_init_label): Likewise.
1717 * c-typeck.c (error_init): Add location parameter. Call error_at
1718 instead of error.
1719 (digest_init): Pass init_loc to error_init.
1720 (really_start_incremental_init):
1721 (push_init_level): Add location parameter. Pass loc to pop_init_level
1722 and error_init.
1723 (pop_init_level): Likewise.
1724 (set_designator): Add location parameter. Pass loc to pop_init_level,
1725 push_init_level, and error_init.
1726 (set_init_index): Add location parameter. Pass loc to error_init and
1727 set_designator.
1728 (set_init_label): Likewise.
1729 (output_init_element): Pass loc to error_init.
1730 (process_init_element): Pass loc to error_init, pop_init_level,
1731 pedwarn_init, and push_init_level.
1732
661a0813
MP
17332014-05-09 Marek Polacek <polacek@redhat.com>
1734
1735 PR c/50459
1736 * c-parser.c (c_parser_attributes): Parse the arguments as an
1737 expression-list if the attribute takes identifier.
1738
2793eeab
MP
17392014-05-08 Marek Polacek <polacek@redhat.com>
1740
1741 PR c/61053
1742 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1743 TYPE_ALIGN_UNIT.
1744
f827930a
MP
17452014-05-08 Marek Polacek <polacek@redhat.com>
1746
1747 PR c/61077
1748 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1749 of main.
1750
1d60af08
KZ
17512014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1752 Mike Stump <mikestump@comcast.net>
1753 Richard Sandiford <rdsandiford@googlemail.com>
1754
1755 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1756 (finish_enum): Use wide-int interfaces.
1757 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1758 * c-typeck.c (build_c_cast): Likewise.
1759 (set_nonincremental_init_from_string): Likewise.
1760 (c_tree_equal): Likewise.
1761
a0e24419
MP
17622014-05-02 Marek Polacek <polacek@redhat.com>
1763
1764 PR c/25801
1765 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1766 Return size_one_node when the type is not complete.
1767 (pointer_diff): Remove comment.
1768 (build_unary_op): Improve error messages.
1769
19fc9faa
MP
17702014-05-02 Marek Polacek <polacek@redhat.com>
1771
1772 * c-typeck.c (c_finish_return): Separate warning_at calls.
1773
63bc4e87
MP
17742014-05-02 Marek Polacek <polacek@redhat.com>
1775
1776 * c-tree.h (error_init): Remove declaration.
1777 (pedwarn_init): Likewise.
1778 * c-typeck.c (error_init): Make static and move above.
1779 (pedwarn_init): Likewise.
1780 (warning_init): Move above.
1781 (maybe_warn_string_init): Likewise.
1782
4bd2511b
JL
17832014-05-01 Jeff Law <law@redhat.com>
1784
1785 Revert:
1786
1787 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1788 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1789 avoid goto.
1790
6a358dcb
MP
17912014-05-02 Marek Polacek <polacek@redhat.com>
1792
1793 PR c/60784
1794 * c-typeck.c (push_init_level): Set constructor_designated to
1795 p->designated for structures.
1796
ae5ebda4
MP
17972014-05-01 Marek Polacek <polacek@redhat.com>
1798
1799 PR c/60915
1800 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1801 function-definition has an attribute after the declarator.
1802
96b40f8d
MP
18032014-05-01 Marek Polacek <polacek@redhat.com>
1804
1805 PR c/60257
1806 * c-typeck.c (warning_init): Add location_t parameter. Call
1807 warning_at instead of warning.
1808 (push_init_level): Pass input_location to warning_init.
1809 (add_pending_init): Add location_t parameter. Pass loc to
1810 warning_init.
1811 (set_nonincremental_init): Pass input_location to add_pending_init.
1812 (set_nonincremental_init_from_string): Likewise.
1813 (output_init_element): Pass loc to warning_init and to
1814 add_pending_init.
1815
32e00768
MP
18162014-05-01 Marek Polacek <polacek@redhat.com>
1817
1818 PR c/43395
1819 * c-typeck.c (c_finish_return): Distinguish between label and variable
1820 when warning about returning local address.
1821
c9379ce2
MP
18222014-05-01 Marek Polacek <polacek@redhat.com>
1823
1824 PR c/29467
1825 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1826 in C89 mode.
1827
d00887e8
MP
18282014-05-01 Marek Polacek <polacek@redhat.com>
1829
1830 PR c/43245
1831 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1832 instead of 0 to WARN_FOR_QUALIFIERS.
1833
5436fa2e
MP
18342014-05-01 Marek Polacek <polacek@redhat.com>
1835
1836 PR c/56989
1837 * c-typeck.c (default_conversion): Use better location for
1838 error call.
1839
f8ed5150
MP
18402014-04-30 Marek Polacek <polacek@redhat.com>
1841
1842 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1843 also when SANITIZE_FLOAT_DIVIDE is on.
1844
8337d1db
MP
18452014-04-30 Marek Polacek <polacek@redhat.com>
1846
1847 PR c/60139
1848 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1849 and pedwarn_init. Use loc insted of input_location.
1850
c4bdc42f
MP
18512014-04-30 Marek Polacek <polacek@redhat.com>
1852
1853 PR c/60351
1854 * c-typeck.c (build_binary_op): Use location when warning about
1855 shift count.
1856
45484dcf
MP
18572014-04-25 Marek Polacek <polacek@redhat.com>
1858
1859 PR c/18079
1860 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1861 always_inline/noinline and hot/cold attributes.
1862
34cf811f
MP
18632014-04-25 Marek Polacek <polacek@redhat.com>
1864
1865 PR c/60114
1866 * c-parser.c (c_parser_initelt): Pass input_location to
1867 process_init_element.
1868 (c_parser_initval): Pass loc to process_init_element.
1869 * c-tree.h (process_init_element): Adjust declaration.
1870 * c-typeck.c (push_init_level): Pass input_location to
1871 process_init_element.
1872 (pop_init_level): Likewise.
1873 (set_designator): Likewise.
1874 (output_init_element): Add location_t parameter. Pass loc to
1875 digest_init.
1876 (output_pending_init_elements): Pass input_location to
1877 output_init_element.
1878 (process_init_element): Add location_t parameter. Pass loc to
1879 output_init_element.
1880
42056eac
JJ
18812014-04-24 Jakub Jelinek <jakub@redhat.com>
1882
1883 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1884 atomic-clause, allow comma in between atomic-clause and
1885 seq_cst.
1886
e162a134
JJ
18872014-04-22 Jakub Jelinek <jakub@redhat.com>
1888
1889 PR c/59073
1890 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1891 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1892
2f6babac
IZ
18932014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1894
1895 PR middle-end/60469
1896 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1897 create_tmp_var instead build_decl for creating temps.
1898 (build_array_notation_expr): Likewise.
1899 (fix_conditional_array_notations_1): Likewise.
1900 (fix_array_notation_expr): Likewise.
1901 (fix_array_notation_call_expr): Likewise.
1902
8edbfaa6
JJ
19032014-03-28 Jakub Jelinek <jakub@redhat.com>
1904
1905 PR c++/60689
1906 * c-tree.h (c_build_function_call_vec): New prototype.
1907 * c-typeck.c (build_function_call_vec): Don't call
1908 resolve_overloaded_builtin here.
1909 (c_build_function_call_vec): New wrapper function around
1910 build_function_call_vec. Call resolve_overloaded_builtin here.
1911 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1912 Call c_build_function_call_vec instead of build_function_call_vec.
1913 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1914 * c-decl.c (finish_decl): Likewise.
1915
7485aeea
MLI
19162014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1917
1918 PR c/55383
1919 * c-typeck.c: Use correct format string in cast-qual warning
1920
b17a8b07
TS
19212014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1922
1923 * c-decl.c (c_decl_attributes): Use
1924 lang_hooks.types.omp_mappable_type.
1925 * c-typeck.c (c_finish_omp_clauses): Likewise.
1926
3af9c5e9
MP
19272014-03-06 Marek Polacek <polacek@redhat.com>
1928
1929 PR c/60197
1930 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1931 of checking tree code.
1932
1c9f5f33
PK
19332014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1934
1935 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1936 (c_parser_parameter_declaration): Likewise.
1937
cc28fc7f
MP
19382014-02-19 Marek Polacek <polacek@redhat.com>
1939
1940 PR c/60195
1941 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1942 Call mark_exp_read on exp.value.
1943 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1944 TREE_ADDRESSABLE on old instead of val.
1945 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1946
b581c05c
PK
19472014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1948
1949 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1950 C_EXPR_APPEND by vec_safe_push.
1951 * c-tree.h (C_EXPR_APPEND): Remove.
1952
81e5eca8
MP
19532014-01-31 Marek Polacek <polacek@redhat.com>
1954
1955 PR c/59963
1956 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1957 build_function_call_vec.
1958 (build_function_call): Likewise.
1959 (build_atomic_assign): Likewise.
1960 (build_function_call_vec): Add arg_loc parameter. Use it.
1961 (convert_arguments): Likewise.
1962 (convert_for_assignment): Rename rhs_loc to expr_loc.
1963 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1964 (c_parser_objc_keywordexpr): Likewise.
1965 (c_parser_postfix_expression_after_primary): Call
1966 build_function_call_vec with expr_loc rather than op_loc.
1967 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1968 build_function_call_vec.
1969 (c_parser_expr_list): Add locations parameter. Fill it with locations
1970 of function arguments.
1971 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1972
68fca595
MP
19732014-01-30 Marek Polacek <polacek@redhat.com>
1974
1975 PR c/59940
1976 * c-typeck.c (build_function_call_vec): Use loc parameter.
1977 (convert_arguments): Add location parameter. Use it.
1978 (ep_convert_and_check): Likewise.
1979 (build_atomic_assign): Adjust convert_for_assignment call.
1980 (build_modify_expr): Likewise.
1981 (digest_init): Likewise.
1982 (c_finish_return): Likewise.
1983 (build_conditional_expr): Adjust ep_convert_and_check calls.
1984 (convert_for_assignment): Add rhs_loc parameter. Use it.
1985 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1986 calls.
1987
fa337f3a
RB
19882014-01-30 Richard Biener <rguenther@suse.de>
1989
1990 PR c/59905
1991 * c-typeck.c (build_function_call_vec): Do not replace calls
1992 to a function via an incompatible type with a runtime abort.
1993
b72271b9
BI
19942014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1995
1996 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1997 flag_enable_cilkplus with flag_cilkplus.
1998 (c_parser_direct_declarator_inner): Likewise.
1999 (c_parser_attribute_any_word): Likewise.
2000 (c_parser_attributes): Likewise.
2001 (c_parser_compound_statement): Likewise.
2002 (c_parser_statement_after_labels): Likewise.
2003 (c_parser_if_statement): Likewise.
2004 (c_parser_switch_statement): Likewise.
2005 (c_parser_do_statement): Likewise.
2006 (c_parser_for_statement): Likewise.
2007 (c_parser_unary_expression): Likewise.
2008 (c_parser_postfix_expression): Likewise.
2009 (c_parser_postfix_expression_after_primary): Likewise.
2010 (c_parser_postfix_expression_after_primary): Likewise.
2011 (c_parser_omp_clause_name): Likewise.
2012 (c_finish_omp_declare_simd): Likewise.
2013 (c_parser_cilk_verify_simd): Likewise.
2014 * c-typeck.c (build_array_ref): Likewise.
2015 (build_function_call_vec): Likewise.
2016 (convert_arguments): Likewise.
2017 (build_compound_expr): Likewise.
2018 (c_finish_return): Likewise.
2019 (c_finish_if_stmt): Likewise.
2020 (c_finish_loop): Likewise.
2021 (build_binary_op): Likewise.
2022
393e8e8b
MP
20232014-01-23 Marek Polacek <polacek@redhat.com>
2024
2025 PR c/59846
2026 * c-typeck.c (parser_build_binary_op): Use location instead of
2027 input_location.
2028 (build_binary_op): Pass location to shorten_compare.
2029
f04dda30
MP
20302014-01-23 Marek Polacek <polacek@redhat.com>
2031
2032 PR c/58346
2033 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2034 an empty aggregate.
2035
789eadcd
MP
20362014-01-23 Marek Polacek <polacek@redhat.com>
2037
2038 PR c/59871
2039 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2040 of a comma expression.
2041 (emit_side_effect_warnings): Likewise.
2042
40f14e9f
BI
20432014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2044
2045 PR c/59825
2046 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2047 function to use walk_tree and moved a lot of its functionality to
2048 expand_array_notations.
2049 (expand_array_notations): New function.
2050
74558dd9
BI
20512014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2052
2053 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2054 attribute an attribute without value.
2055
652fea39
JJ
20562014-01-23 Jakub Jelinek <jakub@redhat.com>
2057
2058 PR middle-end/58809
2059 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2060 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2061
f34f1c87
MP
20622014-01-22 Marek Polacek <polacek@redhat.com>
2063
2064 PR c/59891
2065 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2066 of remove_c_maybe_const_expr on op1 and op2.
2067
241f845a
JJ
20682014-01-15 Jakub Jelinek <jakub@redhat.com>
2069
2070 PR c/58943
2071 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2072 effects, preevaluate rhs using SAVE_EXPR first.
2073
9a74f20c
BI
20742014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2075
2076 PR c++/59631
2077 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2078 statements with if-elseif statements.
2079
96066ce1
MP
20802014-01-06 Marek Polacek <polacek@redhat.com>
2081
2082 PR c/57773
2083 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2084 defined bit-field types only in ISO C.
2085
23a5b65a
RS
20862014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2087
2088 Update copyright years
2089
f9030485
RS
20902014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2091
2092 * c-array-notation.c: Use the standard form for the copyright notice.
2093
41958c28
BI
20942013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2095
2096 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2097 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2098 field in parser is not empty. If not-empty, call the function
2099 c_parser_finish_omp_declare_simd.
2100 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2101 between SIMD-enabled functions and #pragma simd. Added new parameter.
2102 (c_parser_cilk_all_clauses): Modified the usage of the function
2103 c_parser_cilk_clause_vectorlength as mentioned above.
2104 (c_parser_cilk_simd_fn_vector_attrs): New function.
2105 (c_finish_cilk_simd_fn_tokens): Likewise.
2106 (is_cilkplus_vector_p): Likewise.
2107 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2108 "nomask," and "mask" strings in clause name.
2109 (c_parser_omp_all_clauses): Added 3 new case statements:
2110 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2111 PRAGMA_CILK_CLAUSE_NOMASK.
2112 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2113 check for vector attribute and if so call the function
2114 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2115 called the function c_finish_cilk_simd_fn_tokens.
2116 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2117 parser field is non-empty. If so, parse them as you would parse
2118 the omp declare simd pragma.
2119 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2120 Added a check when step is a parameter and flag it as error.
2121 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2122 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2123 pragma_omp_clause.
2124
cef0fd0e
TS
21252013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2126
2127 * c-parser.c (c_parser_omp_parallel): Fix description.
2128
12893402
BI
21292013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2130
2131 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2132 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2133 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2134 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2135
296674db
JM
21362013-12-04 Joseph Myers <joseph@codesourcery.com>
2137
2138 PR c/52023
2139 * c-parser.c (c_parser_alignas_specifier): Use
2140 c_sizeof_or_alignof_type instead of c_alignof.
2141 (c_parser_alignof_expression): Likewise, with min_alignof
2142 parameter depending on alignof spelling used.
2143
edd28054
MP
21442013-12-04 Marek Polacek <polacek@redhat.com>
2145
2146 PR c/54113
2147 * c-decl.c (start_function): Don't warn for missing prototype for
2148 inline functions.
2149
da0fc454
MP
21502013-12-03 Marek Polacek <polacek@redhat.com>
2151
2152 PR c/59351
2153 * c-decl.c (build_compound_literal): Allow compound literals with
2154 empty initial value.
2155
4c2ecab0
JM
21562013-12-02 Joseph Myers <joseph@codesourcery.com>
2157
2158 PR c/58235
2159 * c-typeck.c (build_modify_expr): Diagnose assignment to
2160 expression with array type.
2161
340baef7
JM
21622013-11-29 Joseph Myers <joseph@codesourcery.com>
2163
2164 PR c/42262
2165 * c-typeck.c (process_init_element): Do not treat a string as
2166 initializing a whole array when used with a designator for an
2167 individual element.
2168
6763b9f7
JM
21692013-11-29 Joseph Myers <joseph@codesourcery.com>
2170
2171 PR c/57574
2172 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2173 an inline function following a static declaration.
2174
e7bd1de1
JJ
21752013-11-28 Jakub Jelinek <jakub@redhat.com>
2176
2177 PR c/59310
2178 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2179 to p_name before calling c_parser_omp_teams instead of after.
2180 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2181 argument. Remove unused p_name variable.
2182
0136f8f0
AH
21832013-11-27 Aldy Hernandez <aldyh@redhat.com>
2184 Jakub Jelinek <jakub@redhat.com>
2185
2186 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2187 external_scope is NULL.
2188
241b71bb
TV
21892013-11-27 Tom de Vries <tom@codesourcery.com>
2190 Marc Glisse <marc.glisse@inria.fr>
2191
2192 PR c++/59032
2193 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2194
2fb9a547
AM
21952013-11-22 Andrew MacLeod <amacleod@redhat.com>
2196
2197 * c-typeck.c: Add required include files from gimple.h.
2198
8400e75e
DM
21992013-11-22 David Malcolm <dmalcolm@redhat.com>
2200
2201 * c-decl.c (define_label, shadow_tag_warned)
2202 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2203 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2204 (declspecs_add_type): Remove use of in_system_header macro.
2205 * c-parser.c (c_parser_unary_expression): Likewise.
2206 * c-typeck.c (store_init_value, process_init_element)
2207 (c_start_case): Likewise.
2208
2209 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2210 macro.
2211
2212 * c-parser.c (c_parser_set_source_position_from_token): Remove
2213 reference to in_system_header from comment.
2214
386b1f1f
RS
22152013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2216
2217 * c-decl.c (grokdeclarator): Update comment to refer to
2218 tree_to_[su]hwi rather than tree_low_cst.
2219
ae7e9ddd
RS
22202013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2221
2222 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2223 tree_to_uhwi throughout.
2224
9439e9a1
RS
22252013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2226
2227 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2228 throughout.
2229
9541ffee
RS
22302013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2231
2232 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2233 throughout.
2234
c02065fc
AH
22352013-11-15 Aldy Hernandez <aldyh@redhat.com>
2236
2237 * c-parser.c (c_parser_cilk_simd): New.
2238 (c_parser_cilk_verify_simd): New.
2239 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2240 (c_parser_omp_for_loop): Add case for NE_EXPR.
2241 Set c_break_label for CILK_SIMD.
2242 (c_parser_cilk_clause_vectorlength): New.
2243 (c_parser_cilk_clause_linear): New.
2244 (c_parser_cilk_clause_name): New.
2245 (c_parser_cilk_all_clauses): New.
2246 * c-typeck.c (build_unary_op): Pass location argument to
2247 readonly_error.
2248 (build_modify_expr): Same.
2249 (build_asm_expr): Same.
2250 (c_finish_bc_stmt): Error on break/continue in loops.
2251
18f429e2
AM
22522013-11-14 Andrew MacLeod <amacleod@redhat.com>
2253
2254 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2255
d8a2d370
DN
22562013-11-14 Diego Novillo <dnovillo@google.com>
2257
2258 * c-decl.c: Include print-tree.h.
2259 Include stor-layout.h.
2260 Include varasm.h.
2261 Include attribs.h.
2262 Include stringpool.h.
2263 * c-lang.c: Include fold-const.h.
2264 * c-parser.c: Include stringpool.h.
2265 Include attribs.h.
2266 Include stor-layout.h.
2267 Include varasm.h.
2268 Include trans-mem.h.
2269 * c-typeck.c: Include stor-layout.h.
2270 Include trans-mem.h.
2271 Include varasm.h.
2272 Include stmt.h.
2273
38b7bc7f
JM
22742013-11-13 Joseph Myers <joseph@codesourcery.com>
2275
2276 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2277 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2278 __auto_type.
2279 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2280 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2281 RID_AUTO_TYPE.
2282 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2283 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2284 (c_parser_declarator, c_parser_direct_declarator_inner)
2285 (c_parser_parameter_declaration, c_parser_type_name): All callers
2286 changed.
2287 (c_parser_declaration_or_fndef): Handle declarations with type
2288 determined from the initializer.
2289
45b0be94
AM
22902013-11-12 Andrew MacLeod <amacleod@redhat.com>
2291
18f429e2 2292 * c-typeck.c: Include gimplify.h.
45b0be94 2293
582d9b50
JM
22942013-11-12 Joseph Myers <joseph@codesourcery.com>
2295
2296 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2297 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2298 comment.
2299 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2300 or _Thread_local as appropriate in diagnostics.
2301 (build_null_declspecs): Initialize ret->thread_gnu_p.
2302 (declspecs_add_scspec): Handle either __thread or _Thread_local
2303 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2304 pedantic. Do not disallow _Thread_local extern and _Thread_local
2305 static.
2306
267bac10
JM
23072013-11-07 Joseph Myers <joseph@codesourcery.com>
2308 Andrew MacLeod <amacleod@redhat.com>
2309
2310 * c-aux-info.c (gen_type): Handle atomic qualifier.
2311 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2312 qualifiers when compating types.
2313 (shadow_tag_warned): Handle atomic_p in declspecs.
2314 (quals_from_declspecs): Likewise.
2315 (start_decl): Use c_type_promotes_to when promoting argument
2316 types.
2317 (grokdeclarator): Handle _Atomic.
2318 (get_parm_info): Diagnose any qualifier on "void" as only
2319 parameter.
2320 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2321 comparing types. Use c_type_promotes_to when promoting argument
2322 types.
2323 (finish_function): Use c_type_promotes_to when promoting argument
2324 types.
2325 (build_null_declspecs): Handle atomic_p in declspecs.
2326 (declspecs_add_qual): Handle RID_ATOMIC.
2327 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2328 (c_token_starts_declspecs): Handle RID_ATOMIC.
2329 (c_parser_declspecs): Handle atomic type specifiers and
2330 qualifiers.
2331 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2332 from types of expressions with atomic type.
2333 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2334 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2335 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2336 (c_parser_statement_after_labels, c_parser_switch_statement)
2337 (c_parser_for_statement, c_parser_expr_no_commas)
2338 (c_parser_conditional_expression, c_parser_binary_expression)
2339 (c_parser_cast_expression, c_parser_unary_expression)
2340 (c_parser_postfix_expression)
2341 (c_parser_postfix_expression_after_primary, c_parser_expression):
2342 Use convert_lvalue_to_rvalue.
2343 (c_parser_expression_conv, c_parser_expr_list): Document
2344 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2345 (c_parser_objc_synchronized_statement): Use
2346 convert_lvalue_to_rvalue.
2347 (c_parser_objc_selector): Handle RID_ATOMIC.
2348 (c_parser_objc_receiver, c_parser_array_notation): Use
2349 convert_lvalue_to_rvalue.
2350 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2351 _Atomic (type-name).
2352 (struct c_declspecs): Add atomic_p field.
2353 (convert_lvalue_to_rvalue): Declare.
2354 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2355 corresponding atomic types.
2356 (qualify_type): Don't add _Atomic qualifiers from second argument.
2357 (comp_target_types): Do not allow _Atomic mismatches.
2358 (type_lists_compatible_p): Do not remove atomic qualifiers when
2359 comparing types.
2360 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2361 (build_atomic_assign): New functions.
2362 (build_unary_op): Use build_atomic_assign for atomic increment and
2363 decrement.
2364 (build_conditional_expr): Do not treat _Atomic void as a qualified
2365 version of void.
2366 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2367 (find_anonymous_field_with_type, convert_to_anonymous_field)
2368 (convert_for_assignment): Do not remove atomic qualifiers when
2369 comparing types.
2370 (digest_init): Do not accept initialization of arrays of atomic
2371 elements by string constants.
2372 (build_asm_expr): Use convert_lvalue_to_rvalue.
2373 (build_binary_op): Do not treat _Atomic void as a qualified
2374 version of void.
2375
0c249d4b
DD
23762013-11-06 DJ Delorie <dj@redhat.com>
2377
2378 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2379 both explicit and builtin, print the location of the explicit one.
2380
6d7f7e0a
TB
23812013-11-05 Tobias Burnus <burnus@net-b.de>
2382
2383 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2384 c_parser_omp_distribute, c_parser_omp_teams,
2385 c_parser_omp_target, c_parser_omp_declare): Handle
2386 -fopenmp-simd.
2387
b906f4ca
MP
23882013-11-03 Marek Polacek <polacek@redhat.com>
2389
2390 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2391
ee1d5a02
JJ
23922013-11-01 Jakub Jelinek <jakub@redhat.com>
2393
2394 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2395 check_dup_generic at the end, unless remove is true.
2396 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2397 remove = true;.
2398 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2399
5a9785fb
JJ
24002013-10-31 Jakub Jelinek <jakub@redhat.com>
2401
2402 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2403 with decl that is not pointer nor array.
2404
939b37da
BI
24052013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2406
2407 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2408 a spawning function is found.
2409 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2410 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2411 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2412 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2413 case.
2414 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2415 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2416 expr.
2417 (c_finish_return): Added a check to reject _Cilk_spawn in return
2418 expression.
2419 (build_cilk_spawn): New function.
2420 (build_cilk_sync): Likewise.
2421 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2422
d4af74d4
TB
24232013-10-27 Tobias Burnus <burnus@net-b.de>
2424
2425 PR other/33426
2426 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2427 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2428 (c_parser_statement_after_labels): Update calls.
2429
d73749df 24302013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
2431
2432 PR other/33426
2433 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2434 Handle PRAGMA_IVDEP.
2435 (c_parser_statement_after_labels): Update call.
2436
f28aa681
MP
24372013-10-24 Marek Polacek <polacek@redhat.com>
2438
2439 * c-parser.c (c_parser_struct_declaration): Add a comment.
2440 (c_parser_declarator): Don't allow _Alignas here.
2441
0645c1a2
AM
24422013-10-17 Andrew MacLeod <amacleod@redhat.com>
2443
2444 * c-parser.c: Include omp-low.h.
2445 * c-typeck.c: Likewise.
2446
568a31f2
MP
24472013-10-17 Marek Polacek <polacek@redhat.com>
2448
2449 PR c/58267
2450 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2451 Document syntax of the array-declarator.
2452 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2453 are not permitted.
2454 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2455 (c_parser_struct_declaration): Likewise.
2456 (c_parser_declarator): Likewise.
2457 (c_parser_direct_declarator_inner): Likewise.
2458 (c_parser_parameter_declaration): Likewise.
2459 (c_parser_type_name): Likewise.
2460
acf0174b
JJ
24612013-10-11 Jakub Jelinek <jakub@redhat.com>
2462
2463 * c-lang.h (current_omp_declare_target_attribute): New extern
2464 decl.
2465 * c-parser.c: Include c-lang.h.
2466 (struct c_parser): Change tokens to c_token *.
2467 Add tokens_buf field. Change tokens_avail type to unsigned int.
2468 (c_parser_consume_token): If parser->tokens isn't
2469 &parser->tokens_buf[0], increment parser->tokens.
2470 (c_parser_consume_pragma): Likewise.
2471 (enum pragma_context): Add pragma_struct and pragma_param.
2472 (c_parser_external_declaration): Adjust
2473 c_parser_declaration_or_fndef caller.
2474 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2475 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2476 Adjust recursive call.
2477 (c_parser_struct_or_union_specifier): Use pragma_struct instead
2478 of pragma_external.
2479 (c_parser_parameter_declaration): Use pragma_param instead of
2480 pragma_external.
2481 (c_parser_compound_statement_nostart, c_parser_label,
2482 c_parser_for_statement): Adjust
2483 c_parser_declaration_or_fndef callers.
2484 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2485 it through to c_parser_conditional_expression.
2486 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2487 pass it through to c_parser_binary_expression. Adjust recursive
2488 call.
2489 (c_parser_binary_expression): Remove prec argument, add
2490 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
2491 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2492 binop matches it, use build2 instead of parser_build_binary_op.
2493 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2494 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2495 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2496 Handle pragma_struct and pragma_param the same as pragma_external.
2497 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2498 (c_parser_omp_variable_list): Parse array sections for
2499 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2500 (c_parser_omp_clause_collapse): Fully fold collapse expression.
2501 (c_parser_omp_clause_reduction): Handle user defined reductions.
2502 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2503 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2504 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2505 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2506 c_parser_omp_clause_depend, c_parser_omp_clause_map,
2507 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2508 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2509 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2510 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
2511 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
2512 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2513 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
2514 (c_parser_omp_for_loop): Add CODE argument, pass it through
2515 to c_finish_omp_for. Change last argument to cclauses,
2516 and adjust uses to grab parallel clauses from the array of all
2517 the split clauses. Adjust c_parser_binary_expression,
2518 c_parser_declaration_or_fndef and c_finish_omp_for callers.
2519 (omp_split_clauses): New function.
2520 (c_parser_omp_simd): New function.
2521 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2522 Allow the function to be called also when parsing combined constructs,
2523 and call c_parser_omp_simd when parsing for simd.
2524 (c_parser_omp_sections_scope): If section-sequence doesn't start with
2525 #pragma omp section, require exactly one structured-block instead of
2526 sequence of statements.
2527 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2528 Allow the function to be called also when parsing combined constructs.
2529 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2530 Allow the function to be called also when parsing combined
2531 constructs.
2532 (c_parser_omp_taskgroup, c_parser_omp_cancel,
2533 c_parser_omp_cancellation_point, c_parser_omp_distribute,
2534 c_parser_omp_teams, c_parser_omp_target_data,
2535 c_parser_omp_target_update, c_parser_omp_target,
2536 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2537 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2538 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2539 (c_parser_omp_construct): Add p_name and mask vars. Handle
2540 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
2541 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
2542 and c_parser_omp_sections callers.
2543 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
2544 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2545 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
2546 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
2547 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
2548 OMP_CLAUSE_DEPEND.
2549 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
2550 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
2551 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2552 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2553 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2554 * c-typeck.c: Include tree-inline.h.
2555 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2556 handle_omp_array_sections_1, handle_omp_array_sections,
2557 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2558 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2559 user defined reductions.
2560 (c_tree_equal): New function.
2561 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2562 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2563 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2564 c_check_omp_declare_reduction_r): New prototypes.
2565 * c-decl.c (current_omp_declare_target_attribute): New variable.
2566 (c_decl_attributes): New function.
2567 (start_decl, start_function): Use it instead of decl_attributes.
2568 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2569 c_omp_reduction_decl, c_omp_reduction_lookup,
2570 c_check_omp_declare_reduction_r): New functions.
2571
0a6c2227
TT
25722013-09-25 Tom Tromey <tromey@redhat.com>
2573
2574 * Make-lang.in (c/gccspec.o): Remove.
2575 (CFLAGS-c/gccspec.o): New variable.
2576 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2577 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2578 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2579
f3bc55f0
TT
25802013-09-25 Tom Tromey <tromey@redhat.com>
2581
2582 * Make-lang.in (c/gccspec.o): Don't use subshell.
2583
a24d975c
MP
25842013-09-18 Marek Polacek <polacek@redhat.com>
2585
2586 PR sanitize/58443
2587 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2588 Remove unnecessary check.
2589
ce6923c5
MP
25902013-09-18 Marek Polacek <polacek@redhat.com>
2591
2592 PR sanitizer/58411
2593 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2594 no_sanitize_undefined attribute.
2595
a1e51df9
KT
25962013-09-13 Kai Tietz <ktietz@redhat.com>
2597
2598 PR target/57848
2599 * c-decl.c (c_builtin_function_ext_scope): Remove
2600 wrong assumption that it is never called on prexisting
2601 symbol.
2602
0af94e6f
JR
26032013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2604
2605 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2606
20059c8b
GDR
26072013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2608
2609 * c-objc-common.c (c_tree_printer): Tidy.
2610
de5a5fa1
MP
26112013-08-30 Marek Polacek <polacek@redhat.com>
2612
2613 * c-typeck.c (build_binary_op): Add division by zero and shift
2614 instrumentation.
2615
2531a1d9 26162013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 2617 Joseph Myers <joseph@codesourcery.com>
2531a1d9 2618
6e2bcc98 2619 PR c/35649
2531a1d9
JR
2620 * c-typeck.c (c_common_type): Prefer double_type_node over
2621 other REAL_TYPE types with the same precision.
2622 (convert_arguments): Likewise.
2623
025311c4
GDR
26242013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2625
2626 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2627 (c_initialize_diagnostics): Call a destructor for the early printer.
2628
da6ca2b5
GDR
26292013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2630
2631 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2632 printer initialization.
2633
318cda85 26342013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 2635
318cda85
BI
2636 PR c/57490
2637 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2638 check for truth values.
2639 (expand_array_notation_exprs): Added truth values case. Removed an
2640 unwanted else. Added for-loop to walk through subtrees in default
2641 case.
2642
b066401f
GDR
26432013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2644
2645 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2646
fb48aadc
JM
26472013-07-23 Joseph Myers <joseph@codesourcery.com>
2648
2649 * c-parser.c (struct c_generic_association): Fix typo.
2650
433cc7b0
TT
26512013-07-23 Tom Tromey <tromey@redhat.com>
2652 Joseph Myers <joseph@codesourcery.com>
2653
2654 * c-parser.c (struct c_generic_association): New.
2655 (c_generic_association_d): New typedef.
2656 (c_parser_generic_selection): New function.
2657 (c_parser_postfix_expression): Handle RID_GENERIC.
2658
26d40c3d
JM
26592013-07-13 Jason Merrill <jason@redhat.com>
2660
2661 PR c++/57793
2662 * c-decl.c (finish_struct): Check for too-large class.
2663
ecdbd01a 26642013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
2665
2666 PR c/57821
2667 * c-typeck.c (set_init_index): When folding, check for index overflow.
2668
1141ed3f
BI
26692013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2670
2671 * c-parser.c (c_parser_array_notation): Removed rejection of array
2672 notations in an array of function pointers.
2673
713b46fa
BI
26742013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2675
2676 * c-array-notation.c (make_triplet_val_inv): New function.
2677 (create_cmp_incr): Likewise.
2678 (create_array_refs): Likewise.
2679 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2680 Also modularized common parts between functions and called the function.
2681 (build_array_notation_expr): Likewise.
2682 (fix_conditional_array_notations_1): Likewise.
2683 (fix_array_notation_expr): Likewise.
2684 (fix_array_notation_call_expr): Likewise.
2685
92f20202
MP
26862013-06-18 Marek Polacek <polacek@redhat.com>
2687
2688 PR c/57630
2689 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2690
73a23b06
BI
26912013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2692
2693 * c-array-notation.c (build_array_notation_expr): Reject array notation
2694 mismatch between LHS and RHS even inside a call_expr. Also, removed
2695 a couple while statements that were dead code.
2696
00b8517d
BI
26972013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2698
2699 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2700 excessive precision expressions in function parameters. Also removed
2701 couple unwanted while statements.
2702
1509bdda
BI
27032013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2704
2705 * c-array-notation.c (expand_array_notation_exprs): Added
2706 ARRAY_NOTATION_REF case.
2707
d60f1706
BI
27082013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2709
2710 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2711 function to c-family/array-notation-common.c.
2712 (is_cilkplus_reduce_builtin): Likewise.
2713 (find_rank): Likewise.
2714 (extract_array_notation_exprs): Likewise.
2715 (replace_array_notations): Likewise.
2716 (find_inv_trees): Likewise.
2717 (replace_inv_trees): Likewise.
2718 (contains_array_notation_expr): Likewise.
2719 (find_correct_array_notation_type): Likewise.
2720 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2721 (struct inv_list): Moved this to c-family/array-notation-common.c.
2722 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2723
6d6efbb3
BI
27242013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2725
2726 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2727 reduction functions outside the for-loop. Added a check if the fundecl
2728 is non-NULL. Finally, removed an unwanted if-statement, and made the
2729 body unconditional.
2730
25c22937
BI
27312013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2732
2733 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2734 condition of the if-statement matches the rank of else-block and then-
2735 block when array notations are used.
2736 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2737 expression after the entire function body is parsed.
2738 (c_parser_expr_no_commas): Delayed creating array notation expressions
2739 to the end of function parsing.
2740 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2741 whole if-statement instead of just the condition.
2742 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2743
edd25645
BI
27442013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2745
2746 PR c/57474
2747 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2748 array to NULL_TREE if they are unused. Also added a check for the
2749 field to be NULL before its fields are used in future.
2750
065ce7f1
RO
27512013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2752
2753 PR bootstrap/57450
2754 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2755 (build_array_notation_expr): Likewise.
2756
36536d79
BI
27572013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2758
2759 * c-typeck.c (build_array_ref): Added a check to see if array's
2760 index is greater than one. If true, then emit an error.
2761 (build_function_call_vec): Exclude error reporting and checking
2762 for builtin array-notation functions.
2763 (convert_arguments): Likewise.
2764 (c_finish_return): Added a check for array notations as a return
2765 expression. If true, then emit an error.
2766 (c_finish_loop): Added a check for array notations in a loop
2767 condition. If true then emit an error.
2768 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2769 (build_binary_op): Added a check for array notation expr inside
2770 op1 and op0. If present, we call another function to find correct
2771 type.
2772 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2773 * c-parser.c (c_parser_compound_statement): Check if array
2774 notation code is used in tree, if so, then transform them into
2775 appropriate C code.
2776 (c_parser_expr_no_commas): Check if array notation is used in LHS
2777 or RHS, if so, then build array notation expression instead of
2778 regular modify.
2779 (c_parser_postfix_expression_after_primary): Added a check for
2780 colon(s) after square braces, if so then handle it like an array
2781 notation. Also, break up array notations in unary op if found.
2782 (c_parser_direct_declarator_inner): Added a check for array
2783 notation.
2784 (c_parser_compound_statement): Added a check for array notation in
2785 a stmt. If one is present, then expand array notation expr.
2786 (c_parser_if_statement): Likewise.
2787 (c_parser_switch_statement): Added a check for array notations in
2788 a switch statement's condition. If true, then output an error.
2789 (c_parser_while_statement): Similarly, but for a while.
2790 (c_parser_do_statement): Similarly, but for a do-while.
2791 (c_parser_for_statement): Similarly, but for a for-loop.
2792 (c_parser_unary_expression): Check if array notation is used in a
2793 pre-increment or pre-decrement expression. If true, then expand
2794 them.
2795 (c_parser_array_notation): New function.
2796 * c-array-notation.c: New file.
2797 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2798
cd192ccc
MS
27992013-05-23 Mike Stump <mikestump@comcast.net>
2800
2801 * c-typeck.c (convert_for_assignment): Handle references to memory
2802 spaces better.
2803
427b248d
JM
28042013-05-16 Jason Merrill <jason@redhat.com>
2805
2806 * Make-lang.in (cc1$(exeext)): Use link mutex.
2807
44d90fe1
PC
28082013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2809
2810 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2811 to simply use OPT_Wpointer_arith.
2812 (build_unary_op): Likewise.
2813
4e7d7b3d
JJ
28142013-04-03 Jakub Jelinek <jakub@redhat.com>
2815
2816 PR c/19449
2817 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2818 argument. If set, or it temporarily for parsing of the first
2819 argument into force_folding_builtin_constant_p.
2820 (c_parser_postfix_expression): Adjust callers.
2821
839b422f
RB
28222013-03-21 Richard Biener <rguenther@suse.de>
2823
2824 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2825 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2826
2ee028f1
MP
28272013-02-12 Marek Polacek <polacek@redhat.com>
2828
2829 PR c/44938
2830 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2831 origtypes to NULL.
2832
8824edff
JJ
28332013-01-24 Jakub Jelinek <jakub@redhat.com>
2834
2835 PR c/56078
2836 * c-typeck.c (set_nonincremental_init_from_string): If
2837 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2838 returned false.
2839 (process_init_element): Likewise.
2840
eadd3d0d
JJ
28412012-12-20 Jakub Jelinek <jakub@redhat.com>
2842
2843 PR c++/55619
2844 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2845 argument, don't call default_function_array_conversion
2846 nor c_fully_fold here.
2847 (c_parser_asm_statement): Adjust callers.
2848 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2849 and outputs here, and call default_function_array_conversion
2850 on inputs that don't need to be addressable.
2851
f8a93a2e
JJ
28522012-12-18 Jakub Jelinek <jakub@redhat.com>
2853
2854 PR c/39464
2855 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2856 warning require that both c_common_unsigned_type as well as
2857 c_common_signed_type is the same for both mvl and mvr types.
2858
9771b263
DN
28592012-11-16 Diego Novillo <dnovillo@google.com>
2860
2861 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2862
2863 * c-common.c: Use new vec API in vec.h.
2864 * c-common.h: Likewise.
2865 * c-gimplify.c: Likewise.
2866 * c-pragma.c: Likewise.
2867 * c-pretty-print.c: Likewise.
2868 * c-pretty-print.h: Likewise.
2869 * c-semantics.c: Likewise.
2870 * c-decl.c: Likewise.
2871 * c-parser.c: Likewise.
2872 * c-tree.h: Likewise.
2873 * c-typeck.c: Likewise.
2874
880661a4
JW
28752012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2876
2877 PR c++/54930
2878 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2879
077d1abe
MLI
28802012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2881
2882 PR c/53066
2883 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2884 shadows a function, unless the variable is a function or a
2885 pointer-to-function.
2886
3a785c97
JJ
28872012-10-12 Jakub Jelinek <jakub@redhat.com>
2888
2889 PR c/54381
2890 * c-parser.c (struct c_tree_loc_pair): Removed.
2891 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2892 add location_t * and tree * arguments, fill in array of 3
2893 sizeof_arg trees and corresponding locs.
2894 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2895 c_parser_expr_list callers.
2896 (c_parser_postfix_expression_after_primary): Likewise. Pass
2897 array of 3 sizeof_arg trees and locs (corresponding to first
2898 3 arguments) to sizeof_pointer_memaccess_warning.
2899
703c8606
LC
29002012-10-09 Lawrence Crowl <crowl@google.com>
2901
2902 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2903 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2904 hash table.
2905
5d9de0d0
PC
29062012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2907
2908 PR c++/54194
2909 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2910 call.
2911
a212e43f
MG
29122012-10-09 Marc Glisse <marc.glisse@inria.fr>
2913
2914 PR c++/54427
2915 * c-typeck.c: Include c-common.h.
2916 (enum stv_conv): Moved to c-common.h.
2917 (scalar_to_vector): Moved to c-common.c.
2918 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2919 * Make-lang.in: c-typeck.c depends on c-common.h.
2920
3b78de56
AC
29212012-10-04 Arnaud Charlet <charlet@adacore.com>
2922
2923 * c-decl.c (c_write_global_declarations): Fix handling of
2924 -fdump-ada-spec*.
2925
78c60e3d
SS
29262012-09-30 Sharad Singhai <singhai@google.com>
2927
2928 * c-decl.c (c_write_global_declarations): Use a different method
2929 to determine if the dump has ben initialized.
2930
9f33203d
JM
29312012-09-14 Joseph Myers <joseph@codesourcery.com>
2932
2933 PR c/54552
2934 * c-typeck.c (c_cast_expr): When casting to a type requiring
2935 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2936 c_fully_fold first.
2937
a27d595d
JM
29382012-09-14 Joseph Myers <joseph@codesourcery.com>
2939
2940 PR c/54103
2941 * c-typeck.c (build_unary_op): Pass original argument of
2942 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2943 any C_MAYBE_CONST_EXPR, if it has integer operands.
2944 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2945 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2946 to c_objc_common_truthvalue_conversion, then remove any
2947 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2948 c_objc_common_truthvalue_conversion not
2949 c_common_truthvalue_conversion.
2950 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2951 call note_integer_operands for arguments with integer operands
2952 that are not integer constants.
2953
9feb29df
JJ
29542012-09-13 Jakub Jelinek <jakub@redhat.com>
2955
2956 PR c/54559
2957 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2958 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2959
d409320c
JJ
29602012-08-31 Jakub Jelinek <jakub@redhat.com>
2961
2962 PR c/54428
2963 * c-convert.c (convert): Don't call fold_convert_loc if
2964 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2965 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2966 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2967
6265d07c
JJ
29682012-08-24 Jakub Jelinek <jakub@redhat.com>
2969
2970 PR c/54355
2971 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2972 for nested and empty_ok arguments in the call to
2973 c_parser_declaration_or_fndef.
2974
1a4049e7
JJ
29752012-08-17 Jakub Jelinek <jakub@redhat.com>
2976
2977 * c-tree.h (c_last_sizeof_arg): Declare.
2978 * c-parser.c (struct c_tree_loc_pair): New type.
2979 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2980 non-NULL.
2981 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2982 (c_parser_postfix_expression_after_primary): Likewise. Call
2983 sizeof_pointer_memaccess_warning if needed.
2984 (sizeof_ptr_memacc_comptypes): New function.
2985 * c-typeck.c (c_last_sizeof_arg): New global variable.
2986 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2987
0229aee9
UB
29882012-07-24 Uros Bizjak <ubizjak@gmail.com>
2989
2990 * c-lang.h (lang_decl): Add variable_size GTY option.
2991
7ee2468b
SB
29922012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2993
2994 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2995 * Make-lang.in: Fix dependencies.
2996
d4a10d0a
SB
29972012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2998
2999 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3000 and add language Makefile hooks.
3001 * config-lang.in: New file.
3002 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3003 add the required "normal" config-lang.in rules.
3004 * c-lang.h: Moved from gcc/ to here.
3005 * c-tree.h: Likewise.
3006 * c-objc-common.c: Likewise.
3007 * c-objc-common.h: Likewise.
3008 * c-typeck.c: Likewise.
3009 * c-convert.c: Likewise.
3010 * c-lang.c: Likewise.
3011 * c-aux-info.c: Likewise.
3012 * c-errors.c: Likewise.
3013 * gccspec.c: Likewise.
3014 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3015 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3016\f
5624e564 3017Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
3018
3019Copying and distribution of this file, with or without modification,
3020are permitted in any medium without royalty provided the copyright
3021notice and this notice are preserved.